โดย chatee supasand » 01/10/2019 11:39 am
ผมต้องการอ่านค่าจากไฟล์ config แล้วมันขึ้นแบบนี้อะครับ python 3.7
Traceback (most recent call last):
File "C:/Users/Bell/PycharmProjects/tool_vdotogif/index.py", line 25, in <module>
config.read('config.conf')
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 696, in read
self._read(fp, filename)
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 1014, in _read
for lineno, line in enumerate(fp, start=1):
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\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 2174: character maps to <undefined>
ผมต้องการอ่านค่าจากไฟล์ config แล้วมันขึ้นแบบนี้อะครับ python 3.7
[quote]
Traceback (most recent call last):
File "C:/Users/Bell/PycharmProjects/tool_vdotogif/index.py", line 25, in <module>
config.read('config.conf')
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 696, in read
self._read(fp, filename)
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\lib\configparser.py", line 1014, in _read
for lineno, line in enumerate(fp, start=1):
File "C:\Users\Bell\AppData\Local\Programs\Python\Python37\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 2174: character maps to <undefined>[/quote]