Reputation: 3
"""
Create and show the Open FileDialog
"""
plt.close()
dlg2 = wx.FileDialog(
self, message="Choose a file",
defaultFile="",
wildcard=wildcard,
style=wx.OPEN | wx.MULTIPLE) # | wx.CHANGE_DIR )
I want to Run the codes but have an error on these lines. I don't need anything errors, so please let me know why next error occurs.
Traceback (most recent call last):
File "C:/Users/User/Desktop/python_HY/Python_GUI_M_Analysis_2016.0204_trackpy0.3_minor.changes.py", line 4448, in onOpenImageFile
style=wx.OPEN | wx.MULTIPLE)
AttributeError: 'module' object has no attribute 'OPEN'
That is the Console of codes. Why AttributeError occurs?
Upvotes: 0
Views: 315
Reputation: 20462
According to the docs it should be FD_OPEN
, FD_MULTIPLE
and FD_CHANGE_DIR
:
dlg2 = wx.FileDialog(
self, message="Choose a file",
defaultFile="",
wildcard=wildcard,
style=wx.FD_OPEN | wx.FD_MULTIPLE) # | wx.FD_CHANGE_DIR)
I am guesing the code you are trying to run might have been writen for an outdated version of wx
Upvotes: 1