pathmann / pyTSon

pyTSon is a plugin for the TeamSpeak 3 client, it offers a python interface for the plugin sdk
https://pytson.4qt.de
GNU General Public License v3.0
79 stars 12 forks source link

Error loading iconpack: 'charmap' codec can't decode byte #88

Closed Bluscream closed 6 years ago

Bluscream commented 6 years ago
4/26/2018 14:19:33  pytsonui.setupUi.   Error   Error loading iconpack: 'charmap' codec can't decode byte 0x81 in position 39: character maps to <undefined>
...
4/26/2018 14:51:55  ClientUI    Info    Calling plugin onMenuItemEvent: scHandlerID=1type=2, menuItemID=32, selectedItemID=9    
4/26/2018 14:51:55  pytsonui.setupUi.   Error   Error loading iconpack: 'charmap' codec can't decode byte 0x81 in position 39: character maps to <undefined>    
4/26/2018 14:51:55  pyTSon  Error   Could not load icons: Traceback (most recent call last):
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/scripts\channelGroupChanger\__init__.py", line 96, in __init__
    icons.open()
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/include\ts3client.py", line 271, in open
    self._loadEmoticonSettings(f)
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/include\ts3client.py", line 232, in _loadEmoticonSettings
    for line in f:
  File "C:/Users/blusc/AppData/Roaming/TS3Client/plugins/pyTSon/lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 39: character maps to <undefined>

Iconpack in use: teamspeak-dark + Teamoji patch

pathmann commented 6 years ago

Please upload your emoticons.txt somewhere.

Bluscream commented 6 years ago

emoticons.txt

pathmann commented 6 years ago

I can't reproduce this here, so this might be a windows only bug. Have to check that. This might be related to #93.

pathmann commented 6 years ago

The problem is, that python uses the operating systems encoding system (which might be mbcs on Windows, see https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding).

Keeping this open, because zipped Iconpacks (are they still used?) could be affected too.

pathmann commented 6 years ago

It seems, that zipped iconpacks wasn't affected.

Bluscream commented 6 years ago

Is this fixed now? I'm confused now

pathmann commented 6 years ago

Closed = fixed