logo
Loading...

出現'cp950' codec can't decode byte 0xba in position 4: illegal multibyte sequence 錯誤 - Cupoy

請問出現這一行結果是代表什麼意思,該如何解決?UnicodeDecodeError: 'cp950'...

pycrawler,pycrawler-d02

出現'cp950' codec can't decode byte 0xba in position 4: illegal multibyte sequence 錯誤

2019/11/18 01:43 PM
Python網路爬蟲論壇
呂炎哲
觀看數:0
回答數:3
收藏數:4
pycrawler
pycrawler-d02

請問出現這一行結果是代表什麼意思,該如何解決?


UnicodeDecodeError: 'cp950' codec can't decode byte 0xba in position 4: illegal multibyte sequence 


下面是代碼

fh = open("./data/example.csv")

f = fh.read()   <-------------------------這行報錯

fh.close()


print(f)