-1

im trying to run flask and when i run flask run

I get this error

(snoop) ether@ether:~/Documents/loginsystem$ flask run
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Usage: flask run [OPTIONS]

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

I have done

Run command: set FLASK_APP=main.py
Run command: set FLASK_DEBUG=1
Run command: flask run

but that doesn't change anything on the error

Im using this tutorial for a login system https://codeshack.io/login-system-python-flask-mysql/

Anton Pomieshchenko
  • 2,051
  • 2
  • 10
  • 24
redbulll
  • 91
  • 4
  • 10

1 Answers1

1

Can you try exporting the variable instead of just setting it ?

export FLASK_APP=main.py

and not

set FLASK_APP=main.py

BcK
  • 2,548
  • 1
  • 13
  • 27
  • i run export and than flask run- the server is running but i already have another error because it says 404 not found- but server is running in console – redbulll Apr 11 '20 at 19:57