Skip to content

Instantly share code, notes, and snippets.

@kierdavis
Created October 28, 2021 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kierdavis/f979c356a5748b99254770936d9aefba to your computer and use it in GitHub Desktop.
Save kierdavis/f979c356a5748b99254770936d9aefba to your computer and use it in GitHub Desktop.
$ python --version
Python 3.11.0a1
$ CGITB_FORMAT=html python repro_cgitb_not_emitting_headers_in_text_mode.py | head
<!--: spam
Content-Type: text/html
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom>&nbsp;<br>
$ CGITB_FORMAT=text python repro_cgitb_not_emitting_headers_in_text_mode.py | head
Exception
Python 3.11.0a1: /nix/store/mn6l56lj767ay6nk9r9n4qngkh2q8ci1-python3-3.11.0a1/bin/python
Thu Oct 28 17:10:10 2021
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/kier/sync/projects/cgitb-bug/repro_cgitb_not_emitting_headers_in_text_mode.py in <module>
3
4 format = os.environ.get("CGITB_FORMAT", "text")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment