#133 Can't start a second time.

closed
nobody
None
5
2010-08-28
2010-08-08
No

1. First start creates an empty `~/.drpython/default.idx`
2. Second start expects at least one line or crashes with this traceback

Traceback (most recent call last):
File "drpython.py", line 4279, in <module>
main()
File "drpython.py", line 4253, in main
app = DrApp(0)
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7757, in __init__
self._BootstrapApp()
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7354, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "drpython.py", line 4212, in OnInit
frame = self.frame = DrFrame(None, 101, "DrPython - Untitled 1")
File "drpython.py", line 385, in __init__
self.CreateMenus()
File "drpython.py", line 3976, in CreateMenus
self.pluginsindexmenu = drPluginIndexMenu(self)
File "/home/bj/work/drpython/work/drpython/drPluginMenu.py", line 160, in __init__
self.setupMenu()
File "/home/bj/work/drpython/work/drpython/drPluginMenu.py", line 216, in setupMenu
loadpluginsfromindexfiles, self.indexes = zip(*sorted(zip(loadpluginsfromindexfiles,self.indexes)))
ValueError: need more than 0 values to unpack

Because both involved lists in the next to last line are empty.

Attached patch is a hotfix. Prevents sorting if lists are empty.

Discussion

  • should be fixed now.

     
    • status: open --> closed