python3 爬虫TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be
2018-03-29 08:21
996 查看
今天写淘宝获取所有订单的python程序时出现了一个错误 在此记录
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be
虽然提示出来了问题是在POST请求的数据里面 但是我一直以为是类型问题
最后发现时需要转码在语句之后加上 .edcode("utf-8")
附带一个我的问题实例图
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be
虽然提示出来了问题是在POST请求的数据里面 但是我一直以为是类型问题
最后发现时需要转码在语句之后加上 .edcode("utf-8")
附带一个我的问题实例图
相关文章推荐
- TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type s
- 解决Python3.6,发送POST请求错误提示:POST data should be bytes, an iterable of bytes, or a file object. It canno
- python3爬虫问题 POST data should be bytes or an iterable of bytes
- python3爬虫问题 POST data should be bytes or an iterable of bytes
- python3.x执行post请求时报错“POST data should be bytes or an iterable of bytes...”的解决方法
- python3 “POST data should be bytes or an iterable of bytes...”的解决方法
- Python学习笔记:学习爬虫时遇到的问题TypeError: cannot use a string pattern on a bytes-like object 与解决办法
- Property or field 'siteUrl' cannot be found on object of type 'xx' - maybe not public?
- The type java.lang.Object cannot be resolved.It is indirectly referenced from required .class file
- caffe: fuck compile error again : error: a value of type "const float *" cannot be used to initialize an entity of type "float *"
- Python学习爬虫时遇到的问题TypeError: cannot use a string pattern on a bytes-like object
- AFNetworking 2.0 ERROR:Property with 'retain (or strong)' attribute must be of object type [duplicat
- Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made
- python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
- python3-网络编程-TypeError: send() argument 1 must be bytes or buffer, not str异常
- TypeError: 'numpy.float64' object cannot be interpreted as an integer
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- [Error!]the type java.lang.object cannot be resolved. it is indirectly reference
- spring同时使用aop和spel表达式出错:Property or field 'instrument' cannot be found on object of type 'com.sun.pr
- Python出现TypeError: file() argument 1 must be encoded string without NULL bytes, not str问题解决