0
/workspace/pset6/sentiments/ $ flask run

* Serving Flask app "application" * Forcing debug mode on Traceback (most recent call last): File "/usr/local/bin/flask", line 11, in sys.exit(main()) File "/home/ubuntu/.local/lib/python3.4/site-packages/flask/cli.py", line 513, in main cli.main(args=args, prog_name=name) File "/home/ubuntu/.local/lib/python3.4/site-packages/flask/cli.py", line 380, in main return AppGroup.main(self, *args, **kwargs) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args[1:], **kwargs) File "/home/ubuntu/.local/lib/python3.4/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/ubuntu/.local/lib/python3.4/site-packages/flask/cli.py", line 438, in run_command use_debugger=debugger, threaded=with_threads) File "/home/ubuntu/.local/lib/python3.4/site-packages/werkzeug/serving.py", line 717, in run_simple s.bind((hostname, port)) OSError: [Errno 98] Address already in use

I have tried a lot of processes, like: kill -9 3752807(PID)(response: bash: kill: (3752807) - No such process, killall server (server: no process found), sudo killall apache2 (apache2: no process found), ps -ef |grep server, to remedy the situation, but, all to no avail! I'm stuck!!!!!!!!!!!!!!!!!

1

Here's a hint from the pset7 spec FAQs

OSError: [Errno 98] Address already in use

If, upon running flask, you see this error, odds are you (still) have flask running in another tab. Be sure to kill that other process, as with ctrl-c, before starting flask again. If you haven’t any such other tab, execute fuser -k 8080/tcp to kill any processes that are (still) listening on TCP port 8080.

If that doesn't help, restart your workspace (it's an option in the CS50 tab).

2
  • thanks, you solved a problem that kept me pondering over 8hours! But now, I'm back to my original problem: builtins.RuntimeError RuntimeError: API_KEY not set. This is not true! I copy-pasted my API_KEY and API_SECRET correctly. I don't know why I am getting this error!!! Please, any hints will be highly appreciated. Apr 14 '17 at 21:01
  • Re-exported the API_KEY and API_SECRET for for the 100th time! The problem is solved.Thanks!!! Apr 14 '17 at 21:14

You must log in to answer this question.

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