输出报错:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 220: in

解决方案:将编码方式utf-8 修改为gb18030

例如:

requests.get(url,headers).content.decode('gb18030')

[已解决]报错UnicodeDecodeError的更多相关文章

  1. [已解决]报错: Error response from daemon: conflict

    报错内容: Error response from daemon: conflict: unable to delete f5b6ef70d79b (must be forced) - image i ...

  2. [已解决]报错: Windows下Redis服务无法启动,错误 1067 进程意外终止解决方案

    启动redis时出现的报错内容: 解决方法: 找到登录状态 如果是网络服务,直接双击此服务,修改为本地系统服务即可启动!

  3. [已解决]报错: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/mac/Ana

    报错代码: pip3 install gerapy 报错内容: Could not install packages due to an EnvironmentError: [Errno 13] Pe ...

  4. [已解决]报错: Creating Server TCP listening socket 127.0.0.1:6379: bind: No error

    问题: windows下安装Redis第一次启动报错: [2368] 21 Apr 02:57:05.611 # Creating Server TCP listening socket 127.0. ...

  5. [已解决]报错:xlrd.compdoc.CompDocError: Workbook: size exceeds expected 17920 bytes; corrupt?

    报错代码如下: filePath='test.xls' data=pd.read_excel(filePath) print(data.head()) 报错内容如下: Traceback (most ...

  6. [已解决]报错JSONDecodeError

    报错: 解决:

  7. [已解决]报错:ValueError: Expected 2D array, got scalar array instead

    报错代码: new_x = 84610 pre_y = model.predict(new_x) print(pre_y) 报错结果: ValueError: Expected 2D array, g ...

  8. [已解决]报错:have mixed types. Specify dtype option on import or set low_memory=False

    报错代码: import pandas as pd pd1 = pd.read_csv('D:/python34/program/wx_chat_single/qq_single.csv') 报错内容 ...

  9. [已解决]报错Could not install packages due to an EnvironmentError

    安装OpenCV过程中出现错误 代码: pip-conda install -i https://pypi.douban.com/simple/ opencv-python 报错内容如下: Could ...

随机推荐

  1. LightOJ 1030 Discovering Gold (概率/期望DP)

    题目链接:LightOJ - 1030 Description You are in a cave, a long cave! The cave can be represented by a \(1 ...

  2. Python List reverse() 与list[::-1]

    reverse() https://www.runoob.com/python/att-list-reverse.html list[::-1] https://blog.csdn.net/usern ...

  3. 深入了解line-height(各种单位总结1.5/150%/1.5em)

    默认状态,浏览器使用1.0-1.2 line-height, 这是一个初始值.你可以定义line-height属性来覆盖初始值:p{line-height:140%} 你可以有5种方式来定义line- ...

  4. Linux NIO 系列(04-1) select

    目录 一.select 机制的优势 二.select API 介绍与使用 2.1 select 2.2 fd_set 集合操作 2.3 select 使用范例 三.深入理解 select 模型: 四. ...

  5. Python django tests

    单元测试函数必须以test_开头,否则无法被识别

  6. 那些年踩过的eleUl上传图片的坑?

    html : <el-upload :headers="header" // 请求头参数(一般包含token,认证参数authorization) :data="u ...

  7. v-distpicker 一个好用的三级联动的插件

    // 引入插件npm install v-distpicker --save import VDistpicker from 'v-distpicker' Vue.component('v-distp ...

  8. Javafx弹窗

    在javafx中可能用到一些弹窗,比如点击某个按钮后弹出弹窗提示信息等等 Alert alert = new Alert(AlertType.INFORMATION); alert.setTitle( ...

  9. 2018-8-10-win10-uwp-DataContext-

    title author date CreateTime categories win10 uwp DataContext lindexi 2018-08-10 19:16:53 +0800 2018 ...

  10. celery中配置redis密码时的ValueError: invalid literal for int() with base 10: 'xxxx'

    原配置: celery_broker = 'redis://:xxxx#xxxx@172.17.0.1:6379/0' # docker0 错误原因: 密码中不能有 # ? 等特殊字符 (无语O__O ...