I succesfully created an executable version (Py2exe, Pyinstaller) of my application. When I try to run the app from .exe, I get an error as follows in the log file:
Traceback (most recent call last):
File "CreateAS.pyw", line 8, in <module>
ImportError: cannot import name Publisher
I am really stuck in this part. Could you help me out?
Thanks
I’m guessing that you are using a version of wxPython that is
>= 2.8.11.0? If so, thewx.lib.pubsubpackage has changed. This page describes the changes. There is also a thread on the wxPython mailing list here that talks about this.To make this all work in my project, I did the following described here which was part of the above mailing list thread. I summarize below:
Then in my
setup.pyscript, I had to add the following to the options:You should now be able to build an executable using the new version of pubsub, but with the old api. You might also want to check out the new v3 api of pubsub. If your project isn’t too big, you can probably get by without changing too much.