[issue1985] Bug/Patch: Problem with xml/__init__.py when using freeze.py
Toni Brkic
report at bugs.python.org
Thu Jan 31 23:41:54 CET 2008
New submission from Toni Brkic:
Hi,
I tried to do freeze.py for my script that uses ElementTree.
But got the this error:
File "/usr/lib/python2.5/xml/__init__.py", line 45, in <module>
_xmlplus.__path__.extend(__path__)
AttributeError: 'str' object has no attribute 'extend'
The reason seems that _xmlplus.__path__ is a string
after freeze.py.
I fixed it by changing the import to:
try:
_xmlplus.__path__.extend(__path__)
sys.modules[__name__] = _xmlplus
except AttributeError:
pass
This might not be the correct solution but it works for me. I do not
really now
how the __path__ variable works in a freezed environment.
Best regards
----------
messages: 61937
nosy: glomde
severity: normal
status: open
title: Bug/Patch: Problem with xml/__init__.py when using freeze.py
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1985>
__________________________________
More information about the Python-bugs-list
mailing list