Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#119 165 not working correctly with Mandriva 2008

closed
nobody
None
5
2007-10-20
2007-10-17
John Duchek
No

If I originate drpython in a terminal, and attempt to load a program I get the following errors

[john@localhost ~]$ drpython
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/drpython/drpython.py", line 2186, in OnOpen
self.OpenFile(filenames[0], False, encoding=theencoding)
File "/usr/lib/python2.5/site-packages/drpython/drpython.py", line 2985, in OpenFile
self.reloaddocumentsmenu()
File "/usr/lib/python2.5/site-packages/drpython/drpython.py", line 3032, in reloaddocumentsmenu
self.documentsmenu.Remove(mnuitems[x].GetId())
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 10802, in __getitem__
return _core_.MenuItemList___getitem__(*args, **kwargs)
IndexError: sequence index out of range
[john@localhost ~]$

The program will run but I don't get control back from drpython. (The mouse shows that stupid rotating thing showing it it trying to do something forever). I am running Mandriva 2008 under gnome.

John

Discussion

  • Logged In: YES
    user_id=772872
    Originator: NO

    There is a commented out line:
    If you (ex)change the lines in reloaddocuments in drpython.py:
    self.documentsmenu.Remove(mnuitems[x].GetId())
    #mnuitems[x].Destroy()
    to
    #self.documentsmenu.Remove(mnuitems[x].GetId())
    mnuitems[x].Destroy()
    does that change anything? Or remove all Items in another way (I don't know the command) Menu-Destroy?
    Does that happen all the time. When you close documents (or files) and every time you open another file?

    I tried some months ago DrPython on gnome with Ubuntu, but encountered no problems.
    What wxPython version are you running? Mine was 2.8.1.1, IIRC.

     
  • Logged In: YES
    user_id=772872
    Originator: NO

    If you run the wxpython demo and try in core controls => menu:
    Remove submenu
    Remove Menu

    Is this working?
    I for myself cannot duplicate that behaviour on Windows Xp, unicode, wxpy 2.8.1.1, Python 2.4.

    You start DrPython, no document is open, you open a file, and you get this error?

     
  • John Duchek
    John Duchek
    2007-10-18

    Logged In: YES
    user_id=53434
    Originator: YES

    Hi,
    Your program worked fine til I updated to Mandriva 2008 from mandriva 2007. I tried removing the comment and it made no difference.
    I am running (surprisingly) wxPython 2.6.3.3. Rather old for a brand new distribution. (according to the list of installed rpms.)
    drpython 165, and python 2.51-5. It sounds like I need (or mandriva needs) to update their wxPython maybe... I will see if I can find a workable rpm with a more recent wxPython to load...

    and yes, I start drpython ok, but when I load a file I get the error (any .py file). Then the little circular icon that show linux is trying to access something keeps going and going. I have edited programs and run them with that going the whole time. My other error was my fault. Somehow I incorporated that character.

     
  • John Duchek
    John Duchek
    2007-10-19

    Logged In: YES
    user_id=53434
    Originator: YES

    More about the problem. I am not running wxPython 2.8x not 2.6 (that was a bug in the mandriva installation). It made no difference. However, I just tried to load a second file while the 1st file is open.
    Upon telling it to load the second file it opened a new untitled document. Upon repeating the file load (had to go back to the directory it was in again), it loaded it into the untitled document. The spinning thingy on the icon is still spinning.

    John

     
  • Logged In: YES
    user_id=755704
    Originator: NO

    Reproduced on windows too:

    Traceback (most recent call last):
    File "C:\drpython-svn\tags\165\drpython\drpython.py", line 2281, in OnOpenRece
    ntFile
    self.OpenFile(filename, False)
    File "C:\drpython-svn\tags\165\drpython\drpython.py", line 3011, in OpenFile
    self.reloaddocumentsmenu()
    File "C:\drpython-svn\tags\165\drpython\drpython.py", line 3058, in reloaddocu
    mentsmenu
    self.documentsmenu.Remove(mnuitems[x].GetId())
    File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 1081
    1, in __getitem__
    return _core_.MenuItemList___getitem__(*args, **kwargs)
    IndexError: sequence index out of range

    Enviroment:
    wxPython Version: 2.8.6.0
    wxPython Platform: wxMSW, unicode, wx-assertions-on, SWIG-1.3.29
    Python Version: 2.5.1.final
    Python Platform: win32

    Also reproduced on gentoo (wx26).
    Debian etch running fine (wx26).

    Fixed in revision 257

     
  • Logged In: YES
    user_id=772872
    Originator: NO

    Thanks, I close it now.

     
    • status: open --> closed