A newbie question ... I got the 2.8 source to build with unicode
enabled in debug mode. However, upon attempting to run demo.py I get:
Traceback (most recent call last):
File "demo.py", line 3, in <module>
import Main
File "/home/pstanczyk/Downloads/wxPython-src-2.8.10.1/wxPython/demo/
Main.py", line 355, in <module>
class MyLog(wx.PyLog):
AttributeError: 'module' object has no attribute 'PyLog'
Furthermore, trying the hello world example from the wiki I get:
import wx
app = wx.App(False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'App'
Clearly, I am missing something - any tips warmly welcome
Many thanks in advance
Piotr
python2.5
Python 2.5.1 (r251:54863, Oct 10 2008, 11:26:39)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
A newbie question ... I got the 2.8 source to build with unicode
enabled in debug mode. However, upon attempting to run demo.py I get:
Traceback (most recent call last):
File "demo.py", line 3, in<module>
import Main
File "/home/pstanczyk/Downloads/wxPython-src-2.8.10.1/wxPython/demo/
Main.py", line 355, in<module>
class MyLog(wx.PyLog):
AttributeError: 'module' object has no attribute 'PyLog'
Furthermore, trying the hello world example from the wiki I get:
import wx
app = wx.App(False)
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
AttributeError: 'module' object has no attribute 'App'
Clearly, I am missing something - any tips warmly welcome
Check where the wx module is coming from and verify that it is the one you just built:
That path is okay, but there should be a whole heck of a lot more in the dir(wx)... Take a look in the wx folder and see what it is doing. The __init__.py file should be importing everything from the core modules so it's all in the wx namespace.
this is the right location, but is it what I should be seeing?
That path is okay, but there should be a whole heck of a lot more in the
dir(wx)... Take a look in the wx folder and see what it is doing. The
__init__.py file should be importing everything from the core modules so
it's all in the wx namespace.
Start from a clean source tree and try redoing the build, redirecting the build output to a file. If you end up with the problem again then examin this file for anything having to do with the installation steps and what it is doing with that folder.
···
On 4/20/10 9:26 AM, Piotr Stanczyk wrote:
I thought that there should be more in there ... in the wx folder the
__init__.py file is there but is empty.
For what it’s worth, I had this same error when using my system-wide Python installation, but resolved this error by using python.app (installed via Anaconda). Here are all the steps I took to fix this problem:
···
On Tuesday, April 20, 2010 at 1:53:07 PM UTC-4, Mike Driscoll wrote: