You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a similar error, but the encoding trick did not work.
import requests_html
s = requests_html.HTMLSession()
r = s.get('https://towardsdatascience.com/adversarial-examples-rethinking-the-definition-298504bc73ad')
r.html.encoding = r.encoding
r.html.render()
[I:pyppeteer.launcher] Browser listening on: ws://127.0.0.1:46965/devtools/browser/d9bafa1c-6771-405b-b6fa-dc1ea00069c1
Traceback (most recent call last):
File "", line 1, in
File "C:\Python38\lib\site-packages\requests_html.py", line 607, in render
html = HTML(url=self.url, html=content.encode(DEFAULT_ENCODING), default_encoding=DEFAULT_ENCODING)
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud835' in position 48847: surrogates not allowed
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud83d' in position 12759: surrogates not allowed
这个怎么解决呢,哪里可以加错误忽略
The text was updated successfully, but these errors were encountered: