in py2, using requests, type(response.conten)=unicode, six.StringIO(resp.content) is fine.
but in py3, type(response.conten)=byte, six.StringIO(resp.content) will raise TypeError: initial_value must be str or None, not bytes.
suggest:
in py3, use six.BytesIO(resp.content) instead.
in py2, using requests, type(response. conten) =unicode, six.StringIO( resp.content) is fine. conten) =byte, six.StringIO( resp.content) will raise TypeError: initial_value must be str or None, not bytes.
but in py3, type(response.
suggest: resp.content) instead.
in py3, use six.BytesIO(