Folderview screenlet is one of the screenlets that I have found very useful. But it doesn’t function correctly with the new python version (python 2.7). When the option is selected to view the properties dialog it gives the following exception.
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/screenlets/__init__.py", line 1913, in button_press self.menuitem_callback(widget,'info') File "/usr/lib/python2.7/site-packages/screenlets/__init__.py", line 2119, in menuitem_callback self.show_settings_dialog() File "/usr/lib/python2.7/site-packages/screenlets/__init__.py", line 1570, in show_settings_dialog se.set_info(self.__name__, glib.markup_escape_text(self.__desc__), '(c) ' + glib.markup_escape_text(self.__author__), TypeError: glib.markup_escape_text() argument 1 must be string or read-only buffer, not None
It seems that the variable __desc__ is not set when calling the glib.markup_escape_text() method. So until some geek comes and fix this bug, we can use the following method to overcome this burden. (You’ll be able to follow the same procedure if you are getting this error for some other screenlet too 😀 )
- Open __init__.py in /usr/lib/python2.7/site-packages/screenlets with root privileges.
- Find the line se.set_info(self.__name__, glib.markup_escape_text(self.__desc__), ‘(c) ‘ + glib.markup_escape_text(self.__author__) . This should approximately be in the line 1570.
- Add the following code segment before that line.
if not self.__desc__:
self.__desc__=’Description not set’
(keep in mind that python is sensitive to indentations).
- Save and restart the screenlet.
Congratulations…! You have fixed a bug in a very naive way….! .