aerkalov/ebooklib

Cant write epub

nguyentd01 opened this issue · 1 comments

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 ;-;

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

  • What Python version are you using?
  • What version/build of ebooklib are you using?
  • Looks like you are using Windows, however, which operating system are you using (Win 10, Win 11, etc.)?
  • Are you able to supply some context code?
    • Maybe you have passed some invalid value and we can know that without context.