Hey guys trying to compile code, and heres the error I receive. im fairly new to python programming so any help would be appreciated. thanks in advance.
ms7538@ms:~/Desktop$ ./test.py
Traceback (most recent call last):
File "./test.py", line 10, in <module>
class Panel1(wx.Panel):
File "./test.py", line 22, in Panel1
bmp = wx.BitmapFromImage( wx.ImageFromStream( stream ))
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_gdi.py", line 749, in BitmapFromImage
val = _gdi_.new_BitmapFromImage(*args, **kwargs)
wx._core.PyNoAppError: The wx.App object must be created first!
dt2611
0
Newbie Poster
Recommended Answers
Jump to PostWhen you use wxPython, as with Tkinter, the application has to be initialized first in order to set all kinds of screen parameters.
So the code you are trying to compile is only partially there. Did you write it yourself, or is it someone else's?
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.