0

I am using Anaconda for editing and running scripts. In Anaconda prompt/command prompt, when I type this command :

export FLASK_APP=application.py

I am getting the error: "'export' is not recognized as an internal or external command, operable program or batch file."

when I type

flask run

no error comes, but webpage shows this error

"Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."

When I type just python it is starting Python terminal.

In windows command prompt, even python also didn't got called and so when I type flask run, it shows flask is not recognized. Plz see the scr shot.Green BG is cmd prompt, black BG is Anaconda Prompt.

I don't know why am I getting error.

Can anyone plz help? enter image description here enter image description here

0

The simplest explanation why you get "Not Found" is if there is no @app.route("/") defined in your application.py.

The windows errors are because:

  1. export is not a valid windows command (use set instead)
  2. Neither python nor flask can be found in the path defined in %PATH% environment variable.
2
  • Thnx Dino, based on ur suggestion I searched to setting path in this link: youtube.com/watch?v=dgjEUcccRwM.now when I type flask run, cmd shows * Serving Flask app "application.py" * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: off * Running on 127.0.0.1:5000 (Press CTRL+C to quit) 127.0.0.1 - - [07/Sep/2018 11:32:19] "GET / HTTP/1.1" 404 . When I try to open this webpage 127.0.0.1:5000, it shows error 404 Not found.Can u plz help? – san jeev Sep 7 '18 at 6:04
  • sorry.. its my mistake in application.py file.I corrected it and now I can see webpage correctly.Thanks!! – san jeev Sep 7 '18 at 6:21

You must log in to answer this question.

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