UnicodeDecodeError
Closed this issue · 4 comments
Hello!
Being a novice with programming I downloaded and used the installer for PaleoView.
It seems to go through the process just fine, but upon trying to launch it I get an error message.
Checking the .exe log file this is what has been recorded:
Traceback (most recent call last):
File "paleo_view_v1_1.py", line 23, in
File "mpl_toolkits\basemap_init_.pyc", line 26, in
File "matplotlib\collections.pyc", line 23, in
File "matplotlib\backend_bases.pyc", line 50, in
File "matplotlib\textpath.pyc", line 11, in
File "matplotlib\font_manager.pyc", line 1356, in
File "matplotlib\font_manager.pyc", line 1341, in _rebuild
File "matplotlib\font_manager.pyc", line 1004, in init
File "matplotlib\font_manager.pyc", line 584, in createFontList
File "matplotlib\font_manager.pyc", line 398, in ttfFontProperty
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 0: ordinal not in range(128)
Having tried to look up the error I have a vague hunch about the issue, but I don't think I would be able to handle it myself.
I appreciate any assistance you can offer.
Best regards,
Mattias
Hi Mattias,
This is being caused by installed fonts having names containing non-ascii characters.
I will alter the matplot libraries to fix this problem in the next release of PaleoView.
In the meantime I have created a program that identifies the font files that cause the problem:
- Unzip FontTest folder
- Run FontTest.exe
You may uninstall or temporarily move the fonts that cause the problem.
Warm regards,
Sean
Hi Sean,
Thank you for the quick response!
I seem to encounter the same issue with fonts when trying to launch the FontTest.exe file:
Traceback (most recent call last):
File "FontTest.py", line 28, in
File "matplotlib\font_manager.pyc", line 1358, in
File "matplotlib\font_manager.pyc", line 1343, in _rebuild
File "matplotlib\font_manager.pyc", line 1006, in init
File "matplotlib\font_manager.pyc", line 586, in createFontList
File "matplotlib\font_manager.pyc", line 399, in ttfFontProperty
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 0: ordinal not in range(128)
Best regards,
Mattias
Hi Mattias,
My apologies. It must have cached aspects of the library on my machine. Please try a second version (which I've tested on a 'fresh' machine):
https://latrobeuni-my.sharepoint.com/:u:/g/personal/shaythorne_ltu_edu_au/EdXDdEVtzm5NqvJ8Z6yzIc4BGjwruNNoNQVubYFvYndBGA?e=sEN852
Best regards,
Sean
Hello!
Thank you!
This time the program ran without any issues. It identified a number of fonts related to japanese font styles (e.g. dfmw5.ttf, DFMinE1.ttf). I googled them and it could possibly have to do with my installation of Corel Draw, but I am can't say for certain (as fonts isn't something I've invested a lot of my time in from the beginning).
Anyways, upon removing the fonts PaleoView launched beautifully!
Thank you once more!
Best regards,
Mattias