Forums

500 Internal Server Error/

I have two separate problems.

Port 5000/Internal Server Issue:

The first problem has to do with launching the site. I keep getting an internal server error. I looked into the console and I've added the message below.

flask_mail Issue: For the second problem, my app isn't generating an email after a document submission which I used flask_mail to incorporate.

The errors from the first problem are below. Thank you!

Flasp_app.py

Web Browser: "Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

In Console:

"Address already in use "Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/werkzeug/serving.py", line 908, in prepare_socket s.bind(server_address) OSError: [Errno 98] Address already in use During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/BinaryAlchemy/mysite/flask_app.py", line 67, in <module> app.run(debug=True) File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 920, in run run_simple(t.cast(str, host), port, self, **options) File "/usr/local/lib/python3.10/site-packages/werkzeug/serving.py", line 1059, in run_simple s = prepare_socket(hostname, port) File "/usr/local/lib/python3.10/site-packages/werkzeug/serving.py", line 927, in prepare_socket sys.exit(1) SystemExit: 1"

It looks like you're trying to use app.run() to run your flask application. That won't work on PythonAnywhere - more info in this help page

I also have this issue, who can help pls

An internal server error normally points to a bug in your code; check out the website's error log. It's linked from the "Web" page, and the most recent error will be at the bottom of the file.