aerkalov / ebooklib

Python E-book library for handling books in EPUB2/EPUB3 format -
https://ebooklib.readthedocs.io/
GNU Affero General Public License v3.0
1.47k stars 229 forks source link

Cant write epub #286

Open nguyentd01 opened 1 year ago

nguyentd01 commented 1 year ago

Traceback (most recent call last): File "D:\Document\pyweb\test.py", line 140, in epub.write_epub(f'{title}.epub', book) File "D:\Document\pyweb\venv\lib\site-packages\ebooklib\epub.py", line 1746, in write_epub epub.write() File "D:\Document\pyweb\venv\lib\site-packages\ebooklib\epub.py", line 1368, in write self._write_opf() File "D:\Document\pyweb\venv\lib\site-packages\ebooklib\epub.py", line 1098, in _write_opf self._write_opf_metadata(root) File "D:\Document\pyweb\venv\lib\site-packages\ebooklib\epub.py", line 957, in _write_opf_metadata el.text = v[0] File "src\lxml\etree.pyx", line 1042, in lxml.etree._Element.text.set File "src\lxml\apihelpers.pxi", line 748, in lxml.etree._setNodeText File "src\lxml\apihelpers.pxi", line 736, in lxml.etree._createTextNode File "src\lxml\apihelpers.pxi", line 1539, in lxml.etree._utf8 TypeError: Argument must be bytes or unicode, got 'int'

Process finished with exit code 1 help me,it kept showing this error and i have no idea where did i do wrong ;-;

pbaletkeman commented 1 year ago

@nguyentd01 are you still experiencing this issue? If so: