auth sendemail add_charset is not defined

21 views
Skip to first unread message

Lucas

unread,
Sep 30, 2026, 5:11:04 AMSep 30
to py4web
hello one and all,

using py4web 1.20260805.0.  interesting error when sending email through "Lost Password".

Traceback (most recent call last):
  File "/opt/python/lib/python3.11/site-packages/py4web/core.py", line 1228, in wrapper
    ret = func(*func_args, **func_kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/lib/python3.11/site-packages/py4web/core.py", line 1213, in wrapper
    raise exception
  File "/opt/python/lib/python3.11/site-packages/py4web/core.py", line 1176, in wrapper
    context["output"] = func(*args, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/lib/python3.11/site-packages/py4web/utils/auth.py", line 1181, in _
    form=form_factory(), path=path, user=auth.get_user(), **env
         ^^^^^^^^^^^^^^
  File "/opt/python/lib/python3.11/site-packages/py4web/utils/auth.py", line 1957, in request_reset_password
    self.auth.request_reset_password(email, send=True, next="")
  File "/opt/python/lib/python3.11/site-packages/py4web/utils/auth.py", line 787, in request_reset_password
    self.send("reset_password", user, link=link)
  File "/opt/python/lib/python3.11/site-packages/py4web/utils/auth.py", line 1029, in send
    return self.sender.send(email, subject=subject, body=body)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python/lib/python3.11/site-packages/py4web/utils/mailer.py", line 391, in send
    add_charset("utf-8", charset_QP, charset_QP, "utf-8")
    ^^^^^^^^^^^
NameError: name 'add_charset' is not defined

ok, thank you, lucas
Reply all
Reply to author
Forward
0 new messages