# python | 读文件编码问题 | UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 34: illegal mu **Published by:** [quantdao.eth](https://paragraph.com/@fanguohui/) **Published on:** 2021-12-22 **URL:** https://paragraph.com/@fanguohui/python-unicodedecodeerror-gbk-codec-can-t-decode-byte-0x80-in-position-34-illegal-mu ## Content UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 34: illegal multibyte sequence 后面处理数据时没有转码下,如open函数上 处理如下 with open("data.txt",'r',encoding='UTF-8') as data: ## Publication Information - [quantdao.eth](https://paragraph.com/@fanguohui/): Publication homepage - [All Posts](https://paragraph.com/@fanguohui/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@fanguohui): Subscribe to updates - [Twitter](https://twitter.com/kevinguohui): Follow on Twitter