py2exe and pubsub (again)

When trying to import and use wx.pubsub with py2exe I am running into an error.
I know, I know, this topic has many posts, specifically these:
http://wxpython-users.1045709.n5.nabble.com/wx-lib-pubsub-in-wxPython-2-8-11-0-and-py2exe-td2375048.html
http://stackoverflow.com/questions/5374451/importerror-cannot-import-name-publisher
https://groups.google.com/forum/#!msg/wxpython-users/1EikKr2uPmk/MEjue6j82wMJ
https://groups.google.com/forum/#!topic/wxpython-users/1EikKr2uPmk
https://groups.google.com/forum/#!topic/wxpython-users/_DoJkQWuDOg
https://groups.google.com/forum/#!topic/pypubsub/PmU-JCj4h8A
https://groups.google.com/forum/#!topic/wxpython-users/eGw27sCL0yE
I have been through them pretty carefully, trying out the different options, but for the life of me I cannot figure out what is wrong with my set up.
If anyone has any insight it would be greatly appreciated. I don’t have too much experience with py2exe, so I may just have overlooked something simple.

Specifics:
python 2.7
wxpython 2.8.12.1
windows 7

What I have done:
setup.py file:
options = {
“packages”: [“pubsub”],
“includes” : [“wx.lib.pubsub.", "wx.lib.pubsub.core.”, “wx.lib.pubsub.core.arg1.*” ],
}

setup(
name = “acdataloader_controller”,
version = “1.0”,
packages = find_packages(exclude=[".tests", ".tests.", "tests.", “tests”]),
include_package_data = True, # include everything in source control
options=options,
package_data = package_data
)

Note-- I’ve also tried the options flag as this:
options = {“py2exe”:{
“packages”: [“pubsub”],
“includes” : [“wx.lib.pubsub.", "wx.lib.pubsub.core.”, “wx.lib.pubsub.core.arg1.*” ],
}}

Within my Controller/Main/App Entry point I have:
import wx.lib.pubsub.setupv1
(and I have also tried:
import wx.lib.pubsub.setuparg1 )

Then within my classes that use Publisher i have:
from wx.lib.pubsub import pub as Publisher

Within …\wx\lib\pubsub\pubsub1 i have placed a blank init.py file (i also made sure there was one in pubsub2 and core).

However, when I run setup.py py2exe, i am getting the following output:
The following modules appear to be missing
[‘Carbon’, ‘Carbon.Appearance’, ‘Carbon.Files’, ‘_scproxy’, ‘core.publisher’, ‘l
istenerimpl’, ‘publishermixin’, ‘pysqlite2’, ‘topicargspecimpl’, ‘topicmgrimpl’,
‘wx.lib.pubsub.Publisher’]

and not surprisingly when I run the .exe that is created I get the following error –
Traceback (most recent call last):
File “acdataloader_controller.py”, line 12, in
File “Views\home_view.pyc”, line 11, in
File “wx\lib\pubsub\pub.pyc”, line 24, in
File “wx\lib\pubsub\core\listener.pyc”, line 13, in
ImportError: No module named listenerimpl

Does anybody have a similar setup that may have another trick up their sleeve or possibly see something wrong with what I have tried? Having tried multiple things, I’m not sure if maybe I am trying to many solutions at once? Is there another version of wx that won’t have this issue with py2exe, perhaps the most recent release that Robin just announced-- 3.0.0.0? I am at a loss for what to try next, and with an impending due date, I may have to find an alternative to Pubsub (which I obviously don’t want to do). Any help would be great.

Thanks,
Jake

I maintain pubsub but I rarely use py2exe and remember the thread you quote. Have you looked at http://pubsub.sourceforge.net/development/py2exe.html?highlight=py2exe? You would probably use ‘packages’: ‘wx.lib.pubsub’ but I have not tried.

On a side note, the v1 is no longer supported, and arg1 is only supported minimally (is deprecated), do you have to use either? Why not the default (kwargs)?

Oliver

···

Oliver
Contributor to Open Source: PyPubSub, Lua-iCxx, iof

Contributor to StackOverflow

On Tue, Dec 31, 2013 at 12:31 PM, Jake Larrimore jacoblarrimore@gmail.com wrote:

When trying to import and use wx.pubsub with py2exe I am running into an error.
I know, I know, this topic has many posts, specifically these:
http://wxpython-users.1045709.n5.nabble.com/wx-lib-pubsub-in-wxPython-2-8-11-0-and-py2exe-td2375048.html

http://stackoverflow.com/questions/5374451/importerror-cannot-import-name-publisher
https://groups.google.com/forum/#!msg/wxpython-users/1EikKr2uPmk/MEjue6j82wMJ

https://groups.google.com/forum/#!topic/wxpython-users/1EikKr2uPmk
https://groups.google.com/forum/#!topic/wxpython-users/_DoJkQWuDOg

https://groups.google.com/forum/#!topic/pypubsub/PmU-JCj4h8A
https://groups.google.com/forum/#!topic/wxpython-users/eGw27sCL0yE

I have been through them pretty carefully, trying out the different options, but for the life of me I cannot figure out what is wrong with my set up.
If anyone has any insight it would be greatly appreciated. I don’t have too much experience with py2exe, so I may just have overlooked something simple.

Specifics:
python 2.7
wxpython 2.8.12.1
windows 7

What I have done:
setup.py file:
options = {
“packages”: [“pubsub”],
“includes” : [“wx.lib.pubsub.", "wx.lib.pubsub.core.”, “wx.lib.pubsub.core.arg1.*” ],

    }

setup(
name = “acdataloader_controller”,
version = “1.0”,
packages = find_packages(exclude=[“.tests", ".tests.", "tests.”, “tests”]),

include_package_data = True,    # include everything in source control
options=options,
package_data = package_data

)

Note-- I’ve also tried the options flag as this:
options = {“py2exe”:{

         "packages": ["pubsub"],
         "includes" : ["wx.lib.pubsub.*", "wx.lib.pubsub.core.*", "wx.lib.pubsub.core.arg1.*" ],
    }}

Within my Controller/Main/App Entry point I have:
import wx.lib.pubsub.setupv1
(and I have also tried:
import wx.lib.pubsub.setuparg1 )

Then within my classes that use Publisher i have:
from wx.lib.pubsub import pub as Publisher

Within …\wx\lib\pubsub\pubsub1 i have placed a blank init.py file (i also made sure there was one in pubsub2 and core).

However, when I run setup.py py2exe, i am getting the following output:
The following modules appear to be missing

[‘Carbon’, ‘Carbon.Appearance’, ‘Carbon.Files’, ‘_scproxy’, ‘core.publisher’, ‘l
istenerimpl’, ‘publishermixin’, ‘pysqlite2’, ‘topicargspecimpl’, ‘topicmgrimpl’,

‘wx.lib.pubsub.Publisher’]

and not surprisingly when I run the .exe that is created I get the following error –
Traceback (most recent call last):
File “acdataloader_controller.py”, line 12, in

File “Views\home_view.pyc”, line 11, in
File “wx\lib\pubsub\pub.pyc”, line 24, in
File “wx\lib\pubsub\core\listener.pyc”, line 13, in

ImportError: No module named listenerimpl

Does anybody have a similar setup that may have another trick up their sleeve or possibly see something wrong with what I have tried? Having tried multiple things, I’m not sure if maybe I am trying to many solutions at once? Is there another version of wx that won’t have this issue with py2exe, perhaps the most recent release that Robin just announced-- 3.0.0.0? I am at a loss for what to try next, and with an impending due date, I may have to find an alternative to Pubsub (which I obviously don’t want to do). Any help would be great.

Thanks,
Jake

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Thanks for your reply Oliver. Please see comments below.

I maintain pubsub but I rarely use py2exe and remember the thread you quote. Have you looked at http://pubsub.sourceforge.net/development/py2exe.html?highlight=py2exe? You would probably use ‘packages’: ‘wx.lib.pubsub’ but I have not tried.

Thanks for that link, hadn’t seen it yet. I read through the post and made the changes to setup.py as quoted:
options = {“py2exe”:{
“packages”: “wx.lib.pubsub”,
“includes” : None
}}
but had no luck. Same message from the py2exe cmd prompt output:
The following modules appear to be missing
[‘Carbon’, ‘Carbon.Appearance’, ‘Carbon.Files’, ‘_scproxy’, ‘core.publisher’, ‘l
istenerimpl’, ‘publishermixin’, ‘pysqlite2’, ‘topicargspecimpl’, ‘topicmgrimpl’,
‘wx.lib.pubsub.Publisher’]

···

On Tuesday, December 31, 2013 1:21:44 PM UTC-5, schoenborno wrote:
**
Would it be beneficial to download the PyPubSub module and using the one from the sourceforge page (v3.2) instead of the one that comes with wx? **

On a side note, the v1 is no longer supported, and arg1 is only supported minimally (is deprecated), do you have to use either? Why not the default (kwargs)?

Not sure what you’re referring to. If it is this line:

“wx.lib.pubsub.core.arg1.*”

then I really only included that as a long shot-- something I read in one of the many posts. If there is an alternative option, I’ll give it a shot too.

Oliver

Oliver
Contributor to Open Source: PyPubSub, Lua-iCxx, iof

Contributor to StackOverflow

On Tue, Dec 31, 2013 at 12:31 PM, Jake Larrimore jacobla...@gmail.com wrote:

When trying to import and use wx.pubsub with py2exe I am running into an error.
I know, I know, this topic has many posts, specifically these:
http://wxpython-users.1045709.n5.nabble.com/wx-lib-pubsub-in-wxPython-2-8-11-0-and-py2exe-td2375048.html

http://stackoverflow.com/questions/5374451/importerror-cannot-import-name-publisher
https://groups.google.com/forum/#!msg/wxpython-users/1EikKr2uPmk/MEjue6j82wMJ

https://groups.google.com/forum/#!topic/wxpython-users/1EikKr2uPmk
https://groups.google.com/forum/#!topic/wxpython-users/_DoJkQWuDOg

https://groups.google.com/forum/#!topic/pypubsub/PmU-JCj4h8A
https://groups.google.com/forum/#!topic/wxpython-users/eGw27sCL0yE

I have been through them pretty carefully, trying out the different options, but for the life of me I cannot figure out what is wrong with my set up.
If anyone has any insight it would be greatly appreciated. I don’t have too much experience with py2exe, so I may just have overlooked something simple.

Specifics:
python 2.7
wxpython 2.8.12.1
windows 7

What I have done:
setup.py file:
options = {
“packages”: [“pubsub”],
“includes” : [“wx.lib.pubsub.", "wx.lib.pubsub.core.”, “wx.lib.pubsub.core.arg1.*” ],

    }

setup(
name = “acdataloader_controller”,
version = “1.0”,
packages = find_packages(exclude=[“.tests", ".tests.", "tests.”, “tests”]),

include_package_data = True,    # include everything in source control
options=options,
package_data = package_data

)

Note-- I’ve also tried the options flag as this:
options = {“py2exe”:{

         "packages": ["pubsub"],
         "includes" : ["wx.lib.pubsub.*", "wx.lib.pubsub.core.*", "wx.lib.pubsub.core.arg1.*" ],
    }}

Within my Controller/Main/App Entry point I have:
import wx.lib.pubsub.setupv1
(and I have also tried:
import wx.lib.pubsub.setuparg1 )

Then within my classes that use Publisher i have:
from wx.lib.pubsub import pub as Publisher

Within …\wx\lib\pubsub\pubsub1 i have placed a blank init.py file (i also made sure there was one in pubsub2 and core).

However, when I run setup.py py2exe, i am getting the following output:
The following modules appear to be missing

[‘Carbon’, ‘Carbon.Appearance’, ‘Carbon.Files’, ‘_scproxy’, ‘core.publisher’, ‘l
istenerimpl’, ‘publishermixin’, ‘pysqlite2’, ‘topicargspecimpl’, ‘topicmgrimpl’,

‘wx.lib.pubsub.Publisher’]

and not surprisingly when I run the .exe that is created I get the following error –
Traceback (most recent call last):
File “acdataloader_controller.py”, line 12, in

File “Views\home_view.pyc”, line 11, in
File “wx\lib\pubsub\pub.pyc”, line 24, in
File “wx\lib\pubsub\core\listener.pyc”, line 13, in

ImportError: No module named listenerimpl

Does anybody have a similar setup that may have another trick up their sleeve or possibly see something wrong with what I have tried? Having tried multiple things, I’m not sure if maybe I am trying to many solutions at once? Is there another version of wx that won’t have this issue with py2exe, perhaps the most recent release that Robin just announced-- 3.0.0.0? I am at a loss for what to try next, and with an impending due date, I may have to find an alternative to Pubsub (which I obviously don’t want to do). Any help would be great.

Thanks,
Jake

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Yes. I can't remember what the status was of the version you are using, re
py2exe. I don't remember there every being an issue with pubsub, I think it
was always just a matter of finding the right options to set, but I could
be wrong.

So upgrading is worth a try: the setupv1 module no longer exists so the
code is simpler, and you should not use the setuparg1 unless you have no
choice (such as maintenance on a legacy app). Just straight pubsub. If you
use pip you can just do "pip install pypubsub" then replace wx.lib.pubsub
with pubsub (from pubsub import pub, etc). Note that Publisher no longer
exists, it is pub instead. And sendMessage() requires keyword arguments for
your messages, like this:

pub.sendMessage('topic.name', arg1=123, arg2=obj)

Oliver

···

On Tue, Dec 31, 2013 at 1:43 PM, Jake Larrimore <jacoblarrimore@gmail.com>wrote:

Thanks for your reply Oliver. Please see comments below.

On Tuesday, December 31, 2013 1:21:44 PM UTC-5, schoenborno wrote:

I maintain pubsub but I rarely use py2exe and remember the thread you
quote. Have you looked at http://pubsub.sourceforge.
net/development/py2exe.html?highlight=py2exe<Weiterleitungshinweis?
You would probably use 'packages': 'wx.lib.pubsub' but I have not tried.

Thanks for that link, hadn't seen it yet. I read through the post and
made the changes to setup.py as quoted:
options = {"py2exe":{
             "packages": "wx.lib.pubsub",
             "includes" : None
        }}

but had no luck. Same message from the py2exe cmd prompt output:

The following modules appear to be missing
['Carbon', 'Carbon.Appearance', 'Carbon.Files', '_scproxy',
'core.publisher', 'l
istenerimpl', 'publishermixin', 'pysqlite2', 'topicargspecimpl',
'topicmgrimpl',
'wx.lib.pubsub.Publisher']

*Would it be beneficial to download the PyPubSub module and using the one
from the sourceforge page (v3.2) instead of the one that comes with wx? *