AttributeError |
Python 3.12.2: /usr/pkg/bin/python3.12 Sun Sep 1 03:16:32 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/dholland/public_html/broken/index.cgi in <module> |
1728 |
1729 # end main |
1730 |
1731 |
=> 1732 main() |
main = <function main> |
/home/dholland/public_html/broken/index.cgi in main() |
1676 return |
1677 if not okpkgpath(pkgpath) or not okstring(pkg): |
=> 1678 fail(f, "Invalid package") |
1679 return |
1680 pkg_page(f, showkey, sortkey, pkgpath, pkg) |
global fail = <function fail>, f = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> |
/home/dholland/public_html/broken/index.cgi in fail(f=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, msg='Invalid package') |
1588 f.write("<body bgcolor=\"ffffff\">\n") |
1589 f.write("<h2>Failed</h2>\n") |
=> 1590 f.write("<p>Failed: %s</p>\n" % cgi.escape(msg)) |
1591 f.write("</body>\n") |
1592 f.write("</html>\n") |
f = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, f.write = <built-in method write of _io.TextIOWrapper object>, global cgi = <module 'cgi' from '/usr/pkg/lib/python3.12/cgi.py'>, cgi.escape undefined, msg = 'Invalid package' |
AttributeError: module 'cgi' has no attribute 'escape'
add_note =
<built-in method add_note of AttributeError object>
args =
("module 'cgi' has no attribute 'escape'",)
name =
'escape'
obj =
<module 'cgi' from '/usr/pkg/lib/python3.12/cgi.py'>
with_traceback =
<built-in method with_traceback of AttributeError object>