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

name 'unicode' is not defined #38

Open
davidmanns opened this issue Mar 2, 2023 · 1 comment
Open

name 'unicode' is not defined #38

davidmanns opened this issue Mar 2, 2023 · 1 comment

Comments

@davidmanns
Copy link

running py4web under Python 3.10 got this error when rendering some output assembled with
CAT(string, TABLE(...)) received this error:

Traceback (most recent call last):
File "C:\Users/David/SkyDrive/py4web\py4web\core.py", line 163, in safely
return func()
File "C:\Users/David/SkyDrive/py4web\py4web\core.py", line 503, in
lambda: data.xml(), default=lambda: self._to_html(self._to_unicode(data))
File "c:\Users\David\SkyDrive\py4web\venv\lib\site-packages\yatl\helpers.py", line 397, in xml
return "".join(
File "c:\Users\David\SkyDrive\py4web\venv\lib\site-packages\yatl\helpers.py", line 398, in
s.xml() if isinstance(s, TAGGER) else xmlescape(unicode(s))
NameError: name 'unicode' is not defined

I don't think unicode() exists in Python 3, as used in helpers.py line 398?

@mdipierro
Copy link
Contributor

mdipierro commented Mar 4, 2023 via email

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