Comments (2)
reinstall lxml package could resolve this problem,in my case on centos7 , i use lxml4.2
pip3.7 uninstall lxml && pip3.7 install lxml==4.2
from gitbook2pdf.
I have the same problem.
retrying : https://www.math.pku.edu.cn/teachers/lidf/docs/Rbook/html/_Rbook/prog-io.html
Traceback (most recent call last):
File "gitbook.py", line 5, in
Gitbook2PDF(url).run()
File "/home/flood/soft/gitbook2pdf/gitbook2pdf/gitbook2pdf.py", line 198, in run
loop.run_until_complete(self.crawl_main_content(content_urls))
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/flood/soft/gitbook2pdf/gitbook2pdf/gitbook2pdf.py", line 220, in crawl_main_content
await asyncio.gather(*tasks)
File "/home/flood/soft/gitbook2pdf/gitbook2pdf/gitbook2pdf.py", line 241, in gettext
text = ChapterParser(metatext, title, level, ).parser()
File "/home/flood/soft/gitbook2pdf/gitbook2pdf/gitbook2pdf.py", line 105, 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
from gitbook2pdf.
Related Issues (20)
- 抓取示例页后生成 pdf 时在 ‘make_box’ 处报错 'NoneType' object is not subscriptable HOT 1
- 代码无语法高亮且部分字符不显示
- 使用docker进行部署
- 为什么他需要 Microsoft Visual C++ 14.0
- Getting blank page with every link HOT 1
- 图片显示问题已修复
- 感谢作者,但是图片确实无法输出 HOT 2
- The script cannot handle table DOM
- 爬取到一定的数量的时候,出现disconnect
- 输出空白pdf HOT 3
- The content is truncated after '< script >'
- 如何调整文字行间距
- 抓取某本书时lxml.etree模块抛出Error,附解决方案
- 运行pip install -r requirements.txt出错 HOT 1
- urllib3 v1.26.5 与 requests v2.22.0 依赖冲突
- 抓取失败,记录下问题
- 运行出现dlopen() failed to load问题 HOT 2
- gitbook2pdf stopped working HOT 1
- pip 安装失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitbook2pdf.