Image 01
profile-image

der7even

Nicolas Krzywinski
InfoPanel

Conky by pxjava 165 comments

Hello,

I had a severe problem when trying to run InfoPanel on my new system (Linux Mint 12 Lisa):
nsk@sesta09:~$ python -u /usr/share/screenlets/screenlets-pack-all/InfoPanel/InfoPanelScreenlet.py
CachingBackend: Loading instances from cache
CachingBackend: Loading <InfoPanel1>
is_sticky='False'
keep_above='False'
is_dragged='False'
keep_below='True'
y='0'
x='200'
skip_taskbar='True'
Found a running session of InfoPanel, adding new instance by service.
Error in screenlets.services.get_service_by_name: org.freedesktop.DBus.Error.ServiceUnknown: The name org.screenlets.InfoPanel was not provided by any .service files
Screenlet has already been added to /tmp/screenlets/screenlets.nsk.running
Loading instances in: /home/nsk/.config/Screenlets/InfoPanel/default/
Loaded config from: InfoPanel1.ini
Traceback (most recent call last):
File "/usr/share/screenlets/screenlets-pack-all/InfoPanel/InfoPanelScreenlet.py", line 2042, in <module>
screenlets.session.create_session(InfoPanelScreenlet)
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 474, in create_session
session.start()
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 239, in start
if self.__load_instances():
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 393, in __load_instances
sl = self.create_instance(id=filename[:-4], enable_saving=False)
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 145, in create_instance
sl = self.screenlet(id=id, session=self, **keyword_args)
File "/usr/share/screenlets/screenlets-pack-all/InfoPanel/InfoPanelScreenlet.py", line 561, in __init__
self._themeModule = __import__( self.theme_name )
ImportError: No module named default

I traced this error down to the self.get_screenlet_dir() method in line 558 of InfoPanelScreenlet.py not returning the correct directory.
Calling screenlets.utils.refresh_available_screenlet_paths() just before did helped!

I have no clue why (except that all screenlets are placed in the subdirectory "screenlets-pack-all" and the directory list SCREENLETS_PATH does not contain this path prior to calling this refresh method). I don't know Python well and have no idea why this refresh is necessary here... but maybe it helps s. o. other.

One can easily check that with putting s. th. like into the script:
for dir in screenlets.SCREENLETS_PATH:
print "DEBUG: " + dir
screenlets.utils.refresh_available_screenlet_paths()
for dir in screenlets.SCREENLETS_PATH:
print "DEBUG: " + dir
- Nov 29 2011