gitbook2pdf icon indicating copy to clipboard operation
gitbook2pdf copied to clipboard

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

Open ccforeverd opened this issue 4 years ago • 2 comments

# ...

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

ccforeverd avatar Aug 11 '20 02:08 ccforeverd

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

fuergaosi233 avatar Dec 13 '20 15:12 fuergaosi233

现在直接白页了

djun100 avatar Apr 27 '21 03:04 djun100