This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ulrich.Dorsch
Recipients Ulrich.Dorsch
Date 2015-02-12.14:31:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423751518.98.0.629522641345.issue23454@psf.upfronthosting.co.za>
In-reply-to
Content
TypeError: startswith first arg must be str or a tuple of str, not bytes

In line 558 of plistlib.py at the beginnging of "def _is_fmt_xml(header)" is the problem, caused by the use of the byte arguments defined in line 555 (prefixes = (b'<?xml', b'<plist')).

Similar Problem in line 572:
header.startswith(bom). bom is of type bytes.

FIX: change the definition to:
line 555: prefixes = ('<?xml', '<plist')
line 572: header.startswith(str(bom))

Remaining problem is:
TypeError: read() did not return a bytes object (type=str)

This occurs in the parser object generated by ParserCreate() from xml.parsers.expat

I stopped there with tracing / resolving the problem.
History
Date User Action Args
2015-02-12 14:31:59Ulrich.Dorschsetrecipients: + Ulrich.Dorsch
2015-02-12 14:31:58Ulrich.Dorschsetmessageid: <1423751518.98.0.629522641345.issue23454@psf.upfronthosting.co.za>
2015-02-12 14:31:58Ulrich.Dorschlinkissue23454 messages
2015-02-12 14:31:58Ulrich.Dorschcreate