when I run python code to create an xml object reader with the command FromXmlStream(file) it geves me the error File "/usr/lib/python2.3/sre_compile.py", line 316, in _optimize_unicode mapping = array.array('b', mapping).tostring() AttributeError: 'module' object has no attribute 'array' Reproducible: Always Steps to Reproduce: 1.run the python code 2.import os import sys from xml.dom.ext.reader.Sax2 import FromXmlStream file = open( "ddd.xml", "r") dom = FromXmlStream(file) 3.sample xml file <start> <doseUnits>cGy</doseUnits> </start> Actual Results: File "tot.py", line 10, in ? dom = FromXmlStream(file) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 387 , in FromXmlStream return reader.fromStream(stream, ownerDocument) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 373 , in fromStream self.parser.parse(s) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py", line 123, in p arse self.feed(buffer) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 207, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 300, in start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 57, in startElement self._initRootNode(nameSpace, name) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 123 , in _initRootNode self._ownerDoc = self._impl.createDocument(docElementUri, docElementName, self. _dt) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/DOMImplementation.py", line 5 6, in createDocument el = doc.createElementNS(namespaceURI, qualifiedName) File "/usr/lib/python2.3/site-packages/_xmlplus/dom/Document.py", line 168, in cr eateElementNS if not get_name_pattern().match(qualifiedName): File "/usr/lib/python2.3/site-packages/_xmlplus/dom/FtNode.py", line 43, in get_n ame_pattern _namePattern = re.compile(xml.utils.characters.Name+'\Z') File "/usr/lib/python2.3/sre.py", line 179, in compile return _compile(pattern, flags) File "/usr/lib/python2.3/sre.py", line 227, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python2.3/sre_compile.py", line 469, in compile code = _code(p, flags) File "/usr/lib/python2.3/sre_compile.py", line 450, in _code _compile_info(code, p, flags) File "/usr/lib/python2.3/sre_compile.py", line 428, in _compile_info _compile_charset(charset, flags, code) File "/usr/lib/python2.3/sre_compile.py", line 156, in _compile_charset for op, av in _optimize_charset(charset, fixup): File "/usr/lib/python2.3/sre_compile.py", line 198, in _optimize_charset return _optimize_unicode(charset, fixup) File "/usr/lib/python2.3/sre_compile.py", line 316, in _optimize_unicode mapping = array.array('b', mapping).tostring() AttributeError: 'module' object has no attribute 'array' Expected Results: It should read the file as it did in python 2.2
I noticed your messages in the forums on this. Is it solved? I couldn't tell from your last message in: http://forums.gentoo.org/posting.php?mode=quote&p=824311
can you try merging pyxml-0.8.3 and see if that fixes it? it could be that 0.8.2 http://sourceforge.net/project/shownotes.php?release_id=174846 and can you please post your LANG environment variable and also emerge info? emerge info should always accompnay bug reports.
needinfo