This all works perfectly on my local machine

For some reason though it doesn't work on pythonanywhere.com

Equally helpful is that pythonanywhere.com's user wsgi script throws away the exception's context