0

When I press "flask run" command I am getting the following error

~/workspace/2017/flask/ $ flask run
 * Serving Flask app "application"
 * Forcing debug mode on
Traceback (most recent call last):
  File "/usr/local/bin/flask", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 478, in main
    cli.main(args=args, prog_name=name)
  File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 403, in run_command
    use_debugger=debugger, threaded=with_threads)
  File "/usr/local/lib/python3.4/dist-packages/werkzeug/serving.py", line 677, in run_simple
    s.bind((hostname, port))
OSError: [Errno 98] Address already in use
~/workspace/2017/flask/ $  

Can someone kindly help me in rectifying the issue. Thx

2

From the FAQs in the spec:

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.

You must log in to answer this question.

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