Forums

Not getting the debug print statement output

I am not getting the updated error log as I have raised in "username_pythtonanywhere_com_wsgi.py" file. import sys print(f"\n{sys.path}\n") raise Exception("This is a test exception to see the sys.path in the error logs.") I have added this lines in the file to check system path. I am expecting to get the result of print statement in error.log file.

I don't see any web apps set up on your account -- you should go to the Web page and configure a web app there. Then edit the auto-generated uwsgi file. Also, you don't have to raise exceptions to debug your code -- maybe use print call (the output will show in the server log, unless you redirect it to stderr, then it will be shown in the error log).