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

Issue with EpubHTML and uid #265

Open
Finkkbeiner opened this issue Oct 26, 2022 · 1 comment
Open

Issue with EpubHTML and uid #265

Finkkbeiner opened this issue Oct 26, 2022 · 1 comment

Comments

@Finkkbeiner
Copy link

Finkkbeiner commented Oct 26, 2022

Hi,

When creating a chapter using a special uid like that:
chap = epub.EpubHtml(title=chap_title, file_name=(delete_spaces(chap_title) + '.xhtml'), lang='en', uid=_uid+i)

I get the following error:

File "src/lxml/etree.pyx", line 3153, in lxml.etree.SubElement
  File "src/lxml/apihelpers.pxi", line 199, in lxml.etree._makeSubElement
  File "src/lxml/apihelpers.pxi", line 194, in lxml.etree._makeSubElement
  File "src/lxml/apihelpers.pxi", line 324, in lxml.etree._initNodeAttributes
  File "src/lxml/apihelpers.pxi", line 335, in lxml.etree._addAttributeToNode
  File "src/lxml/apihelpers.pxi", line 1539, in lxml.etree._utf8
TypeError: Argument must be bytes or unicode, got 'int'

Any idea why?

@aerkalov
Copy link
Owner

aerkalov commented Dec 5, 2022

I would assume uid is a number and not a string.

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