首页 > 其他分享 >UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 250: illegal multi

UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 250: illegal multi

时间:2022-10-27 23:55:50浏览次数:41  
标签:sequence illegal 0xae decode json codec

解决UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xae in position 2638: illegal multibyte sequence

问题描述
python读取json文件时报错:UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xae in position 2638: illegal multibyte sequence

import json
f = open('channelManifest.json')
obj = f.read()
result = json.loads(obj)
print(result)

import json

with open('xxx.txt', 'rb') as f:
data = json.load(f)
print(data)

标签:sequence,illegal,0xae,decode,json,codec
From: https://www.cnblogs.com/ruiy/p/16834434.html

相关文章

  • mysqlsequence并发
    mysql有sequence吗在该目录中创建一个小型php文件(info.php的)在浏览器中调用它。该文件将显示很多关于我们的php安装,如安装的php版本和有用的一些细节。如何用navicatpre......
  • CF438D The Child and Sequence
    题目链接:​​传送门​​区间求和,单点修改,区间取模线段树里维护一个max,取模的时候如果区间最大值小于max直接return就可以不然的话递归到叶子节点再取模有效降低复杂度不......
  • CF438D(The Child and Sequence-线段树mod x)
    维护一个区间的和,支持单点修改,区间modx考虑a>x,时,amodx<a/2,否则a=x所以暴力维护就行了#include<iostream>#include<cmath>#include<algorithm>#include<cstdio>#inclu......
  • Sequence Flow示例
    准备实践环境[root@master~]#knservicecreatesq-appender-01--imageikubernetes/appender--envMESSAGE="-HandledbySQ-01"Creatingservice'sq-appender-0......
  • SP685 SEQPAR - Partition the sequence 题解
    SP685SEQPAR-PartitionthesequenceSolution目录SP685SEQPAR-PartitionthesequenceSolution更好的阅读体验戳此进入题面SolutionCodeUPD更好的阅读体验戳此进......
  • nested exception is java.lang.IllegalStateException: PathVariable annotation was
    本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/282错误显示:使用SpringBoot进行开发时,使用feign组件进行远程调用,可能会......
  • [Typescript] 62. Medium - Fibonacci Sequence
    Implementageneric Fibonacci<T> thattakesanumber T andreturnsitscorresponding Fibonaccinumber.Thesequencestarts:1,1,2,3,5,8,13,21,34,......
  • java.lang.IllegalStateException: org.apache.rocketmq.remoting.exception.Remoting
    坑爹的org.apache.rocketmq:rocketmq-spring-boot-starterorg.apache.rocketmq:rocketmq-spring-boot-starter:2.2.2和com.alibaba:fastjson:2.0.15一起使用的时候,会......
  • csu 1551: Longest Increasing Subsequence Again BIT + 思维
    预处理last[i]表示以第i个开始,的合法后缀。pre[i]表示以第i个结尾,的合法前缀。那么每一个数a[i],肯定是一个合法后缀last[i]+一个合法前缀,那么合法前缀的数字要小于a[i],并......
  • D. The Child and Sequence
    题目链接D.TheChildandSequence给定数列,区间查询和,区间取模,单点修改。\(n,m\leq10^5\)解题思路势能线段树线段树维护一个最大值\(mx\),对\(x\)取模时,当......