0

enter image description hereThe distribution code for new CS50-Finance application is not working.

It is giving Internal Server Error when I do "flask run".

Can you please help?

enter image description here

~/workspace/ $ cd finance
~/workspace/finance/ $ flask run
* Serving Flask app "application.py" (lazy loading)
* Environment: development
* Debug mode: off
* Running on https://ide-3807fce4d9954096a715437557b82908-8080.cs50.xyz/ (Press CTRL+C to quit)
* Restarting with stat
192.168.37.30 - - [04/Jan/2021 09:05:01] "GET / HTTP/1.0" 500 -
Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 338, in __call__
self._flush_bg_loading_exception()
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 326, in _flush_bg_loading_exception
reraise(*exc_info)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 314, in _load_app
self._load_unlocked()
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 330, in _load_unlocked
self._app = rv = self.loader()
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 240, in locate_app
__import__(module_name)
File "/home/ubuntu/workspace/finance/application.py", line 25
retuflaskrn responseex
^
SyntaxError: invalid syntax
192.168.37.30 - - [04/Jan/2021 09:05:01] "GET /favicon.ico HTTP/1.0" 500 -
Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 343, in __call__
rv = self._load_unlocked()
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 330, in _load_unlocked
self._app = rv = self.loader()
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 240, in locate_app
__import__(module_name)
File "/home/ubuntu/workspace/finance/application.py", line 25
retuflaskrn responseex
^
SyntaxError: invalid syntax
8
  • Could you please add a screenshot of the error or copy paste it here? – Vsjain Jan 3 at 5:54
  • Edited the question with the screenshot. Thanks for looking into it ! – Shyam Jan 3 at 16:30
  • Actually I needed a screenshot of the cs50 ide terminal – Vsjain Jan 3 at 17:12
  • Added the terminal screen. Thanks ! – Shyam Jan 4 at 6:19
  • The terminal after the error has occured, not before. – Vsjain Jan 4 at 8:40
0

I reloaded the files from 2021 PSET and now it works :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .