解决Python3.6,发送POST请求错误提示:POST data should be bytes, an iterable of bytes, or a file object. It canno
之前遇到的坑,今天又遇到了,在此记录一下,
爬虫时,转码data时,出现下面错误信息:
POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.
测试代码:
# -*- coding:utf-8 -*-
import urllib.request
原创
2017-12-12 00:08:08 ·
28749 阅读 ·
5 评论