I have an application which imports PDFWindow from wx.lib.pdfwin
and it works fine. When I make an application using py2exe I get an error
inside the PDFWindow creation
Traceback (most recent call last):
File “vpt.py”, line 1607, in
File “vpt.py”, line 1601, in main
app.MainLoop()
File “vpt.py”, line 127, in init
# binds are not working with pdf object
File “wx\lib\pdfwin.pyo”, line 82, in init
AttributeError: ‘NoneType’ object has no attribute
‘WebBrowser’
This occurs when invoking the line
self.pdf = PDFWindow(self,
style=wx.SUNKEN_BORDER)
Searching around I find some references to typelibs and
things like that but I am totally confused about what to do.
Any gurus out there who know about this issue?
Thanks,
Michael
I found the answer at http://lists.wxwidgets.org/pipermail/wxpython-users/2007-June/065906.html
When I include this in my setup,py file
things work. I don’t really know why though.
-Michael
···
From: wxpython-users-bounces@lists.wxwidgets.org
[mailto:wxpython-users-bounces@lists.wxwidgets.org] On Behalf Of Michael Toth
Sent: Saturday, November 29, 2008
5:28 PM
To:
wxpython-users@lists.wxwidgets.org
Subject: [wxpython-users] using
py2exe with pdfwin
I have an application which imports PDFWindow from
wx.lib.pdfwin and it works fine. When I make an application using py2exe
I get an error inside the PDFWindow creation
Traceback (most recent call last):
File “vpt.py”, line 1607, in
File “vpt.py”, line 1601, in main
app.MainLoop()
File “vpt.py”, line 127, in init
# binds are not working with pdf object
File “wx\lib\pdfwin.pyo”, line 82, in
init
AttributeError: ‘NoneType’ object has no attribute
‘WebBrowser’
This occurs when invoking the line
self.pdf = PDFWindow(self, style=wx.SUNKEN_BORDER)
Searching around I find some references to typelibs and
things like that but I am totally confused about what to do.
Any gurus out there who know about this issue?
Thanks,
Michael
Michael Toth wrote:
I found the answer at http://lists.wxwidgets.org/pipermail/wxpython-users/2007-June/065906.html
When I include this in my setup,py file things work. I don’t really know why though.
-Michael
Looks like Robin sort of explained it in that post. For whatever reason, the pythoncom dlls aren't usable in the fully bundled executable. You'd have to ask the guys on the py-win32 group or the py2exe group why that is.
As for Hong's answer, it looks like he is including python "typelibs" option (package?) and telling it what UID to use. If you ever do much registry hacking, you'll soon find that each program has its own Unique ID number. The PDFWindow seems to have "EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B", so that's why Hong used it.
Clear as mud?
Mike
···
------------------------------------------------------------------------
*From:* wxpython-users-bounces@lists.wxwidgets.org [mailto:wxpython-users-bounces@lists.wxwidgets.org] *On Behalf Of *Michael Toth
*Sent:* Saturday, November 29, 2008 5:28 PM
*To:* wxpython-users@lists.wxwidgets.org
*Subject:* [wxpython-users] using py2exe with pdfwin
I have an application which imports PDFWindow from wx.lib.pdfwin and it works fine. When I make an application using py2exe I get an error inside the PDFWindow creation
Traceback (most recent call last):
File "vpt.py", line 1607, in <module>
File "vpt.py", line 1601, in main
app.MainLoop()
File "vpt.py", line 127, in __init__
# binds are not working with pdf object
File "wx\lib\pdfwin.pyo", line 82, in __init__
AttributeError: 'NoneType' object has no attribute 'WebBrowser'
This occurs when invoking the line
self.pdf = PDFWindow(self, style=wx.SUNKEN_BORDER)
Searching around I find some references to typelibs and things like that but I am totally confused about what to do.
Any gurus out there who know about this issue?
Thanks,
Michael
------------------------------------------------------------------------
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users