Why is this wxpython code giving me the following error?
self.Bind(wx.EVT_MENU,self.onNewFile,self.New_File)
def onNewFile(self,evt):
wx.FileDialog(None,'Choose a file',os.getcwd(),"",wx.OPEN)
if dialog.ShowModal() == wx.ID_OK:
print dialog.GetPath()
dialog.Destroy()
Other codes to set up menubar and create items are there but when this is executed I get the following error:
Traceback (most recent call last):
File "C:\Python27\Front_End.py", line 52, in onNewFile
wx.FileDialog(None,'Choose a file',os.getcwd(),"",wx.OPEN)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 2430, in __init__
_windows_.FileDialog_swiginit(self,_windows_.new_FileDialog(*args, **kwargs))
TypeError: String or Unicode type required
What does this mean?