[PyKDE] ElementTree in PyQt4 latest with py2exe not working
Javier Sanz
jsceballos at gmail.com
Thu Feb 1 02:04:56 GMT 2007
Hi.
I'm having exactly the same problem, with PyQt GPL 4.1.1, Python 2.5 and Qt
4.2.2.
I fixed "ImportError: No module named elementtree.ElementTree" downloading
and installing ElementTree, as Rick suggested.
Now I'm dealing with the other error you mention (widget-plugins path not
valid), but I don't know what to do. When you mention you solved it by
editing objcreator.py, is that PyQt's source? If that's what you mean, is
there any other way to solve it? I didn't compile PyQt myself, I downloaded
PyQt binaries, and editing PyQt's source is "ugly".
Cheers,
Javier
On 12/20/06, Bastian Salmela <bastian.salmela at gmail.com> wrote:
>
> hi,
> i've ran into problem and i was hoping it gets fixed in the newer version
> of qt/pyqt but doesn't seem to go away. so any information how to make this
> work would be highly appreciated.
>
> problem: i'm writing application that uses uic.loadType() to load up user
> interface. this all works fine when i'm launching my program from console,
> but if i pack it for distribution with py2exe, i get couple of errors
> running executable.
>
> 1) error saying the library.zip doesn't have proper path for
> widget-plugins. this i fixed by replacing plugindir path in objcreator.pyto point where they actually are located.
> plugindir =
> "c:\\Python25\\Lib\\site-packages\\PyQt4\\uic\\widget-plugins\\"
> so that's fine now.
>
> 2) error saying "ImportErrror: No module named elementtree.ElementTree"
> after checking source again i see pyQt4 seems to try many different way to
> load this, and with Idle i found out the one that works, so I removed other
> stuff and just added the line that works: "from xml.etree.cElementTreeimport parse"
>
> 3) now there is no error about elementTree and it gets packed nicely..
> things still work on commandline, but another error says now: "ImportError:
> cannot import name parse"
>
> this is where I'm stuck now.
> i'm far from being pro, or even good python programmer, so i need help.
> please is anyone know how to make this work, i would love to hear about it.
> i need to get this program packed so i can distribute it at our workplace on
> several computers.
>
> p.s. i tried cxfreeze too, same errors.
>
> thank you!
>
> /me crosses fingers.
>
> .b
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>
>
>
--
Un saludo,
Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070201/73d51c00/attachment.html
More information about the PyQt
mailing list