tvo / rapid

Commandline client for Spring rapid downloading system
Other
7 stars 6 forks source link

rapid-gui fails to start #3

Closed jandd closed 14 years ago

jandd commented 14 years ago

rapid-gui does not start (tried both easy_install'ed and extracted versions) it gives the following traceback:

> rapid-gui 
Traceback (most recent call last):
  File "/usr/games/rapid-gui", line 15, in 
    window = RapidGUI()
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 124, in __init__
    self.mainWidget = MainRapidWidget(self)
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 109, in __init__
    self.availableWidget = AvailableRapidListWidget(self)
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 95, in __init__
    self.sourceModel.reload()
  File "/usr/lib/pymodules/python2.6/rapid/models.py", line 29, in reload
    self.reloadData( lambda p: not p.installed )
  File "/usr/lib/pymodules/python2.6/rapid/models.py", line 18, in reloadData
    for p in filter( dataFunction, main.rapid.packages ):
AttributeError: 'module' object has no attribute 'packages'

running in pdb you can see that main.rapid really does not have a packages object:

> python -m pdb `which rapid-gui`
> /usr/games/rapid-gui(4)()
-> from rapid.gui import RapidGUI
(Pdb) c
Traceback (most recent call last):
  File "/usr/lib/python2.6/pdb.py", line 1296, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib/python2.6/pdb.py", line 1215, in _runscript
    self.run(statement)
  File "/usr/lib/python2.6/bdb.py", line 372, in run
    exec cmd in globals, locals
  File "", line 1, in 
  File "/usr/games/rapid-gui", line 15, in 
    window = RapidGUI()
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 124, in __init__
    self.mainWidget = MainRapidWidget(self)
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 109, in __init__
    self.availableWidget = AvailableRapidListWidget(self)
  File "/usr/lib/pymodules/python2.6/rapid/gui.py", line 95, in __init__
    self.sourceModel.reload()
  File "/usr/lib/pymodules/python2.6/rapid/models.py", line 29, in reload
    self.reloadData( lambda p: not p.installed )
  File "/usr/lib/pymodules/python2.6/rapid/models.py", line 18, in reloadData
    for p in filter( dataFunction, main.rapid.packages ):
AttributeError: 'module' object has no attribute 'packages'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/lib/pymodules/python2.6/rapid/models.py(18)reloadData()
-> for p in filter( dataFunction, main.rapid.packages ):
(Pdb) dir(main.rapid)
['ConfigParser', 'DependencyException', 'DetachedPackageException', 'Downloader', 'File', 'MockDownloader', 'OfflineRepository', 'OfflineRepositoryException', 'OnlineRepository', 'Package', 'PackageFormatException', 'PackageSource', 'PinnedTags', 'Rapid', 'RapidException', 'Repository', 'RepositorySource', 'StreamerFormatException', 'StringIO', 'TestPinnedTags', 'TestRapid', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'atomic_write', 'binascii', 'bitarray', 'closing', 'gzip', 'gzip_string', 'master_url', 'md5', 'mkdir', 'mkdir_p', 'os', 'psv', 'set_spring_dir', 'shutil', 'struct', 'unittest', 'urlparse', 'weakref']
(Pdb) 
renefritze commented 14 years ago

fixed in http://github.com/springlobby/rapid/commit/58cd98943cbd606a160bbdc2ae7899349ac1b470 afaik tobi's on vacation atm, so it'll be a bit until it gets merged back

jandd commented 14 years ago

I had to fix the patch because os was not imported at the right place: http://github.com/jandd/rapid/commit/d2c470bf7aef63f54719e0e24872339cce2d35e7

renefritze commented 14 years ago

hmm, that's a little weird I think. Did you try to run via the run.py in the repo, ./run.py bin/rapid-gui ? That script imports 'os' so that might mask the issue. Nevertheless I'd be interested in a trace without your commit.

jandd commented 14 years ago

I just installed bin/rapid-gui in /usr/games/ (I'm working on a policy compliant Debian package) and ran it as rapid-gui as a normal user would do it.

tvo commented 14 years ago

fixed in v0.3.3, thanks for the patches!

That script imports 'os' so that might mask the issue. Indeed. Fixed run.py now too so it leaves less traces :-)