0

Below mentioned code - when in execute in vs code using the cmd - python -m flask run/ fask run. I get the error message - OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Tried changing the port and executing it still no luck. If anybody is aware of the situation request help

# import main Flask class and request object
from werkzeug.wrappers import Request, Response
from flask import Flask, request

app = Flask(name)


@app.route("/")
def display():
    return "Hello World!"


if name == 'main':
    from werkzeug.serving import run_simple
    run_simple('localhost', 9998 , app)
  • [Related](https://stackoverflow.com/q/2778840/9098350). Btw you're missing the double underscores in your example (i.e. `__name__` and `__main__`). – Bas van der Linden Jul 29 '21 at 11:44

0 Answers0