requests-html: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 89: invalid continuation byte
Hi @kennethreitz , First, thanks for the great library.
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 89: invalid continuation byte I suffer from this problem #78.
- pip install -U git+https://github.com/kennethreitz/requests-html
- Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]
from requests_html import HTMLSession
session = HTMLSession()
r = session.get('http://www.nm-n-tax.gov.cn/nmgsj/ssxc/msdt/list_1.shtml')
r.html.render()
d:\python36\lib\site-packages\pyppeteer\launcher.py in launch(self) 127 raise BrowserError(‘Unexpectedly chrome process closed with ’ 128 f’return code: {self.proc.returncode}’) –> 129 msg = self.proc.stdout.readline().decode() 130 if not msg: 131 continue
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 89: invalid continuation byte
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 25
win10 x64 run normal but linux
UnicodeDecodeError: ‘utf-8’ codec can’t decode bytes in position 235-236: invalid continuation byte with open( ‘r’’)as f: f.read()
r.html.encoding = r.encodingworks for me. thanks, @kennethreitz is a star!r.html.encoding = r.encodingis not working for me.Still ‘{UnicodeDecodeError}‘utf-8’ codec can’t decode byte 0xfc in position 9230: invalid start byte’
yeah the workaround didn’t work for me too
I saw that too 😃 I think this is a bug and should be reopened.