With the attached code, and an xml file, I got the following error with python 3.4.2:
$ cat toto.xml
<?xml version='1.0' encoding='UTF-8'?>
<test></test>
$ python3.4 toto.py
Traceback (most recent call last):
File "toto.py", line 10, in <module>
parse(proc.stdout, ContentHandler())
File "/usr/lib/python3.4/xml/sax/__init__.py", line 33, in parse
parser.parse(source)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 119, in parse
self.prepareParser(source)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 111, in prepareParser
self._parser.SetBase(source.getSystemId())
TypeError: must be str, not int
The same test works with python2, and I would expect the code to work with python 3 too.
Thanks,
Jocelyn |