Failed

--> -->
 
 
AttributeError
Python 3.10.10: /usr/pkg/bin/python3.10
Fri Apr 26 07:06:15 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()
   1686         field = cgidata.getfirst("field")
   1687         if field is None:
=> 1688             fail(f, "You must choose a field to filter on.")
   1689             return
   1690         if not okstring(field) or field not in showkey.fields:
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='You must choose a field to filter on.')
   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.10/cgi.py'>, cgi.escape undefined, msg = 'You must choose a field to filter on.'

AttributeError: module 'cgi' has no attribute 'escape'
      args = ("module 'cgi' has no attribute 'escape'",)
      name = 'escape'
      obj = <module 'cgi' from '/usr/pkg/lib/python3.10/cgi.py'>
      with_traceback = <built-in method with_traceback of AttributeError object>