Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant write epub #286

Open
nguyentd01 opened this issue Jul 20, 2023 · 1 comment
Open

Cant write epub #286

nguyentd01 opened this issue Jul 20, 2023 · 1 comment

Comments

@nguyentd01
Copy link

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
Copy link

@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.

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

No branches or pull requests

2 participants