Exception when OpenSesame is launched from folder with non-ascii characters
smathot opened this issue · 1 comments
smathot commented
When OpenSesame is launched from a folder with non-ascii characters, the following exception occurs when initializing the osf extension. Somewhere along the lines, a part of the icons path is not properly decoded to Unicode, it seems.
Extension error
item-stack:
exception type: UnicodeDecodeError
exception message: 'ascii' codec can't decode byte 0xe9 in position 10: ordinal not in range(128)
time: Sun Feb 25 11:24:53 2018
Traceback:
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\libqtopensesame\extensions\_extension_manager.py", line 133, in fire
ext.fire(event, **kwdict)
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\libqtopensesame\extensions\_base_extension.py", line 386, in fire
getattr(self, u'event_%s' % event)(**kwdict)
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\share\opensesame_extensions\OpenScienceFramework\OpenScienceFramework.py", line 667, in event_startup
self.__initialize()
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\share\opensesame_extensions\OpenScienceFramework\OpenScienceFramework.py", line 853, in __initialize
self.user_badge = widgets.UserBadge(self.manager, icon_size)
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\QOpenScienceFramework\widgets\userbadge.py", line 90, in __init__
visit_osf_icon = QtGui.QIcon.fromTheme('web-browser', qta.icon('fa.globe'))
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\qtawesome\__init__.py", line 125, in icon
return _instance().icon(*names, **kwargs)
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\qtawesome\__init__.py", line 36, in _instance
('ei', 'elusiveicons-webfont.ttf', 'elusiveicons-webfont-charmap.json')
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\qtawesome\iconic_font.py", line 180, in __init__
self.load_font(*fargs)
File "C:\Users\dvlpe\Downloads\opensesame_3.2.1-py2.7-win32-2\lib\site-packages\qtawesome\iconic_font.py", line 223, in load_font
os.path.join(directory, ttf_filename)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 10: ordinal not in range(128)
dschreij commented
Right. I see if I can tackle this one soon.