normalize in PyXML version hell (was: ...)
Unknown <[email protected]>
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Harlan et al. This is PyXML version madness; sigh.
What version of PyXML do you have?
The offending code is somewhere along here in
ARK/arkbase/ark/xmlfile.py:
try: # works for 2.0/... ?
# import xml.dom.ext.reader.Sax
# doc = xml.dom.ext.reader.Sax.FromXmlStream(thing_file)
import xml.dom.minidom
doc = xml.dom.minidom.parse(filename)
root_elem = doc.documentElement
except ImportError:
#thing_file.close() # because we're about to reopen it
import xml.dom.core
import xml.dom.utils
doc = xml.dom.utils.FileReader().readFile(filename)
root_elem = doc.documentElement
root_elem.normalize()
I'm going to *guess* that you threw an exception in the
'try' part (which you shouldn't have...). Perhaps put a
print 'here' # or 'there'
before/after the 'except ImportError', and remove all
doubt.
Does your
/usr/local/lib/python2.0/site-packages/_xmlplus/dom/minidom.py
include a 'normalize' method ('def normalize(...):')?
I'd guess either an unfriendly version of PyXML, or perhaps
a good version misinstalled (though it doesn't look like it)...
Will
==== Harlan's blip:
Current blip:
root@dog# ./try-ark
./try-ark: warning: this script may be overly paranoid and, um, wrong...
+ ./arkcmd package reveal --hosts=dog --verbose --use-deps=max arkbase
Traceback (most recent call last):
File "./arkcmd", line 41, in ?
things_mgr.doToolSubcommand()
File "./ark/thing.py", line 153, in doToolSubcommand
victims = self.unpackSpecs(ark_ctrl.cmdLineNonOptions())
File "./ark/thing.py", line 86, in unpackSpecs
thing = self.lookup(thing_name,team_id)
File "./ark/thing.py", line 47, in lookup
team_id = ark.team.ACTING_TEAM().id
File "./ark/team.py", line 23, in ACTING_TEAM
_ActingTeam.instance = ArkTeam(acting_team_id)
File "./ark/team.py", line 78, in __init__
(self._is_prototype, self._xmlf) = xml_file.read(explicit_filename="%s/team.xml" % (ark.control.ArkControl().repository(team_id)))
File "./ark/xmlfile.py", line 109, in read
root_elem.normalize()
File "/usr/local/lib/python2.0/site-packages/_xmlplus/dom/minidom.py", line 74, in __getattr__
raise AttributeError, key
AttributeError: normalize
root@dog#