noisymime / gloss-mc

Automatically exported from code.google.com/p/gloss-mc
0 stars 0 forks source link

Handling module failures #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running gloss on Hardy Heron 8.04 I get an error :
ekohlwey@gecko:~/Desktop/gloss-mc-orig$ python gloss.py

** (gloss.py:22579): WARNING **: failed to bind GLXGetProcAddress or
GLXGetProcAddressARB
Found Module: slideshow
Found Module: dvd_player
Found Module: myth_tv_player
Found Module: music_player
Found Module: video_player
/home/ekohlwey/Desktop/gloss-mc-orig/InputQueue.py:47: DeprecationWarning:
clutter.stage_get_default is deprecated, use clutter.Stage instead
  self.stage = clutter.stage_get_default()
Traceback (most recent call last):
  File "gloss.py", line 106, in loadGloss
    tempMod = mods.Module(self.glossMgr, self.dbMgr)
  File
"/home/ekohlwey/Desktop/gloss-mc-orig/modules/music_player/music_player.py", 
line
32, in __init__
    self.backend = Backend(self)
  File
"/home/ekohlwey/Desktop/gloss-mc-orig/modules/music_player/backends/myth_music.p
y",
line 33, in __init__
    self.get_directories()
  File
"/home/ekohlwey/Desktop/gloss-mc-orig/modules/music_player/backends/myth_music.p
y",
line 41, in get_directories
    results = dbMgr.run_sql(sql)
  File "/home/ekohlwey/Desktop/gloss-mc-orig/myth/MythMySQL.py", line 55,
in run_sql
    self.cursor.execute(sql)
  File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 166, in
execute
    self.errorhandler(self, exc, value)
  File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 35,
in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table
'mythconverg.music_directories' doesn't exist")

This isn't quite the correct functionality... First, the interface should
report an error, and second it should not crash the whole program if a
module fails to load.... I've included a workaround, however there's
probably a more elegant way to address the issue.

I'll open up a second issue for the actual module failure.

Original issue reported on code.google.com by ekohlwey...@gtempaccount.com on 16 May 2008 at 4:04

Attachments:

GoogleCodeExporter commented 9 years ago
Good point with the modules not being able to crash the whole app. I'll use a
variation of your patch. 

Individual problem with the music player has been corrected.

Original comment by noisym...@gmail.com on 10 Jun 2008 at 3:22