Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

python3 gitbook.py https://book.flutterchina.club/ 报错 #69

Open
ccforeverd opened this issue Aug 11, 2020 · 2 comments
Open

python3 gitbook.py https://book.flutterchina.club/ 报错 #69

ccforeverd opened this issue Aug 11, 2020 · 2 comments

Comments

@ccforeverd
Copy link

# ...

done :  https://book.flutterchina.club/chapter1/
done :  https://book.flutterchina.club/chapter12/ios_implement.html
done :  https://book.flutterchina.club/chapter12/android_implement.html
done :  https://book.flutterchina.club/chapter10/
done :  https://book.flutterchina.club/chapter4/stack.html
done :  https://book.flutterchina.club/chapter13/multi_languages_support.html
Traceback (most recent call last):
  File "gitbook.py", line 306, in <module>
    Gitbook2PDF(url).run()
  File "gitbook.py", line 195, in run
    loop.run_until_complete(self.crawl_main_content(content_urls))
  File "/Users/zhangshuyao/anaconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "gitbook.py", line 217, in crawl_main_content
    await asyncio.gather(*tasks)
  File "gitbook.py", line 238, in gettext
    text = ChapterParser(metatext, title, level, ).parser()
  File "gitbook.py", line 102, in parser
    return html.unescape(ET.tostring(context).decode())
  File "src/lxml/etree.pyx", line 3437, in lxml.etree.tostring
  File "src/lxml/serializer.pxi", line 139, in lxml.etree._tostring
  File "src/lxml/serializer.pxi", line 199, in lxml.etree._raiseSerialisationError
lxml.etree.SerialisationError: IO_ENCODER
@fuergaosi233
Copy link
Owner

测试没办法复现,感觉是 Lxml 安装存在问题,可以尝试下用 Issues 中的 Docker 镜像试试

@djun100
Copy link

djun100 commented Apr 27, 2021

现在直接白页了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants