requests.Session() how do you set 'replace' on the encoding?

Veek M vek.m1234 at gmail.com
Thu Jul 2 12:22:56 EDT 2015


I'm getting a Unicode error:

Traceback (most recent call last):
  File "fooxxx.py", line 56, in <module>
    parent = anchor.getparent()
UnicodeEncodeError: 'gbk' codec can't encode character u'\xa0' in position 
8: illegal multibyte sequence

I'm doing:
s = requests.Session()
to suck data in, so.. how do i 'replace' chars that fit gbk



More information about the Python-list mailing list