python3 pycurl 出现 TypeError: string argument expected, got 'bytes' 解决方案

用pycurl请求指定链接并返回结果时出现 TypeError: string argument expected, got 'bytes'  错误

经过排查问题出现在使用StringIO的write方法上,用BytesIO替代StringIO即可解决问题,代码如下:

原文地址:https://www.cnblogs.com/lmh001/p/9205535.html