Menu

#137 Cannot open or save files

v1.0 (example)
open
nobody
None
5
2014-12-16
2014-09-01
AntumDeluge
No

When trying to open or save a file from DrPython nothing happens, the file dialogs do not appear. Upon closing the program I receive the following error message:

Open dialog:

Mon Sep 1 09:19:44 2014:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/drpython/drpython.py", line 2340, in OnOpen
dlg = drFileDialog.FileDialog(self, "Open", self.prefs.wildcard, MultipleSelection=True, ShowRecentFiles=True)
File "/usr/local/lib/python2.7/site-packages/drpython/drFileDialog.py", line 1031, in FileDialog
return drWxFileDialog(parent, title, "", "", wildcard, wx.OPEN|wx.HIDE_READONLY|wx.MULTIPLE)
AttributeError: 'module' object has no attribute 'HIDE_READONLY'

Save dialog:

Mon Sep 1 09:43:46 2014:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/drpython/drpython.py", line 2597, in OnSaveAs
dlg = drFileDialog.FileDialog(self, "Save File As", self.prefs.wildcard, IsASaveDialog=True)
File "/usr/local/lib/python2.7/site-packages/drpython/drFileDialog.py", line 1029, in FileDialog
return drWxFileDialog(parent, title, "", "", wildcard, wx.SAVE|wx.HIDE_READONLY|wx.OVERWRITE_PROMPT)
AttributeError: 'module' object has no attribute 'HIDE_READONLY'

My System:

  • Operating System: FreeBSD 10.0 amd64
  • Python: v2.7.8
  • DrPython: v3.11.4 (installed from FreeBSD ports collection)
  • wxPython: v2.8.12

Discussion

  • AntumDeluge

    AntumDeluge - 2014-09-01

    I also noticed this warning when starting DrPython from the command line:

    $ drpython
    /usr/local/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py:16632: UserWarning: wxPython/wxWidgets release number mismatch
    warnings.warn("wxPython/wxWidgets release number mismatch")

    It appears to be trying to use wxPython v3, but my system is set up to use v2.8:

    $ ls /usr/local/lib/python2.7/site-packages | grep -i wx-
    wx-2.8-gtk2-ansi
    wx-2.8-gtk2-unicode
    wx-3.0-gtk2
    $ wx-config --version
    2.8.12

     
  • Gio Loi

    Gio Loi - 2014-12-16

    wx.HIDE_READONLY is deprecated since wxPython 2.6.

    The new 2.9 version doesn't support it with the default build configuration.
    For those People who works in Linux I suggest to delete "wx.HIDE_READONLY" in the drFileDialog.py.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.