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 craigh
Recipients craigh
Date 2017-10-01.20:51:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506891071.57.0.213398074469.issue31658@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import xml.sax
>>> import pathlib
[...]
>>> xml.sax.parse(pathlib.Path('path/to/file'), handler)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/xml/sax/__init__.py", line 33, in parse
    parser.parse(source)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 105, in parse
    source = saxutils.prepare_input_source(source)
  File "/usr/lib/python3.6/xml/sax/saxutils.py", line 355, in prepare_input_source
    if source.getCharacterStream() is None and source.getByteStream() is None:
AttributeError: 'PosixPath' object has no attribute 'getCharacterStream'
History
Date User Action Args
2017-10-01 20:51:11craighsetrecipients: + craigh
2017-10-01 20:51:11craighsetmessageid: <1506891071.57.0.213398074469.issue31658@psf.upfronthosting.co.za>
2017-10-01 20:51:11craighlinkissue31658 messages
2017-10-01 20:51:11craighcreate