You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run python main.py I get this error. I use python 3.9
C:\Discord Bots\auto-voice-channel>python main.py
Traceback (most recent call last):
File "C:\Discord Bots\auto-voice-channel\main.py", line 33, in
korean.read('language/ko_kr.ini')
File "C:\Program Files\Python39\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "C:\Program Files\Python39\lib\configparser.py", line 1020, in _read
for lineno, line in enumerate(fp, start=1):
File "C:\Program Files\Python39\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 0x9d in position 40: character maps to
The text was updated successfully, but these errors were encountered:
The issue arises because the configparser library is attempting to read a file that contains characters not encoded in the default encoding (likely Windows-1252 on your system). This results in a UnicodeDecodeError.
The easiest solution without tweaking your system is to Specify UTF-8 Encoding in the main.py as:
When I run python main.py I get this error. I use python 3.9
C:\Discord Bots\auto-voice-channel>python main.py
Traceback (most recent call last):
File "C:\Discord Bots\auto-voice-channel\main.py", line 33, in
korean.read('language/ko_kr.ini')
File "C:\Program Files\Python39\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "C:\Program Files\Python39\lib\configparser.py", line 1020, in _read
for lineno, line in enumerate(fp, start=1):
File "C:\Program Files\Python39\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 0x9d in position 40: character maps to
The text was updated successfully, but these errors were encountered: