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

Veek M vek.m1234 at
Thu Jul 2 18:22:56 CEST 2015

I'm getting a Unicode error:

Traceback (most recent call last):
  File "", 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