Skip to content

name 'unicode' is not defined #38

@davidmanns

Description

@davidmanns

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions