[PEAK] easy_install, PyXML and the ZSI module
Erik Johnson
ejohnso99 at gmail.com
Thu Dec 16 16:22:18 EST 2010
I am having some issues in trying to use packages installed via
easy_install (on Mac OSX, 10.6) . The two packages are PyXML and ZSI. I am
trying to create a simple SOAP Client, but I get up to a certain point and the
ZSI module pukes out this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "HelloService_services.py", line 49, in sayHello
response = self.binding.Receive(sayHelloResponse.typecode)
File "build/bdist.macosx-10.6-universal/egg/ZSI/client.py", line
497, in Receive
File "build/bdist.macosx-10.6-universal/egg/ZSI/client.py", line
397, in ReceiveSOAP
File "build/bdist.macosx-10.6-universal/egg/ZSI/parse.py", line 54,
in __init__
ImportError: No module named ext.reader
The root of that problem seems to be this:
usi-3759l:python ej$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml
>>> import xml.dom
>>> import xml.dom.ext
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named ext
As best as I can tell, PyXML 0.8.4 got installed:
usi-3759l:python ej$ cd /Library/Python/2.6/site-packages/
usi-3759l:site-packages ej$ ls
PyXML-0.8.4-py2.6-macosx-10.6-universal.egg
README
ZSI-2.0_rc3-py2.6.egg
easy-install.pth
fpconst-0.7.2-py2.6.egg
pybonjour-1.1.1-py2.6.egg-info
pybonjour.py
pybonjour.pyc
usi-3759l:site-packages ej$ cat easy-install.pth
import sys; sys.__plen = len(sys.path)
./ZSI-2.0_rc3-py2.6.egg
./PyXML-0.8.4-py2.6-macosx-10.6-universal.egg
./fpconst-0.7.2-py2.6.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
p+len(new)
PyXML-0.8.4-py2.6-macosx-10.6-universal.egg is actually a directory, and
within there exists the path .../_xml/dom/ext/reader, ext having the contents:
Dom2Sax.py Visitor.pyc __init__.py
Dom2Sax.pyc XHtml2HtmlPrinter.py __init__.pyc
Printer.py XHtml2HtmlPrinter.pyc c14n.py
Printer.pyc XHtmlPrinter.py c14n.pyc
Visitor.py XHtmlPrinter.pyc reader
and reader having the contents:
HtmlLib.py PyExpat.py Sax2.py Sgmlop.py
HtmlLib.pyc PyExpat.pyc Sax2.pyc Sgmlop.pyc
HtmlSax.py Sax.py Sax2Lib.py __init__.py
HtmlSax.pyc Sax.pyc Sax2Lib.pyc __init__.pyc
So, it seems like the software the ZSI module is trying to use is actually
installed, but somehow the import system is not making it available.
Trying to rerun easy_install from within site_packages, naming the egg
directory generates this output:
sh-3.2# easy_install PyXML-0.8.4-py2.6-macosx-10.6-universal.egg
Processing PyXML-0.8.4-py2.6-macosx-10.6-universal.egg
PyXML 0.8.4 is already the active version in easy-install.pth
Installing xmlproc_parse script to /usr/local/bin
Installing xmlproc_val script to /usr/local/bin
Installed /Library/Python/2.6/site-packages/PyXML-0.8.4-py2.6-macosx-10.6-universal.egg
Processing dependencies for PyXML==0.8.4
Finished processing dependencies for PyXML==0.8.4
but no change in trying to import xml.dom.ext.
Anybody have any ideas on what's going on here?
Thanks,
Erik Johnson
More information about the PEAK
mailing list