Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask not starting upon execution of app.py : #1

Open
ram2210 opened this issue May 10, 2020 · 4 comments
Open

Flask not starting upon execution of app.py : #1

ram2210 opened this issue May 10, 2020 · 4 comments

Comments

@ram2210
Copy link

ram2210 commented May 10, 2020

Hi there,

When I try to execute the file "app.py", the following happens and I get an error. Please could someone shed some light on this and how I can get past it?

Thanks,
Ram

Error message:

  • Serving Flask app "main" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Restarting with stat
    An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
C:\ProgramData\Anaconda3\envs\py3-TF2.0\lib\site-packages\IPython\core\interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

@Anjum20-a
Copy link

Hi there,

When I try to execute the file "app.py", the following happens and I get an error. Please could someone shed some light on this and how I can get past it?

Thanks,
Ram

Error message:

  • Serving Flask app "main" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Restarting with stat
    An exception has occurred, use %tb to see the full traceback.

SystemExit: 1
C:\ProgramData\Anaconda3\envs\py3-TF2.0\lib\site-packages\IPython\core\interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

Hey
Try naming the file something else instead of app.py . It worked for me.

@Rahul-Gothwal
Copy link

@ram2210
it's working fine
just try changing your virtual environment.

and don't run it on jupyter notebook if you are.

@wakeupcoders
Copy link

@ram2210 Yes Ram everything is working fine. Have you tried with proper environment and libraries?
Also, Use this Link as your reference. It will work fine.

@shreyasGarud
Copy link

@ram2210
It is always good to create to create virtual environment while working on any project.

Checkout this link to know how to create virtual environment :
https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/

Then,

  1. Activate virtual environment.
  2. Go to the project directory and run command "pip freeze". This will generate the list of all required libraries with their respective versions.
  3. Now copy and paste that list in ".txt" file. Eg. requirements.txt
  4. Finally, run command "pip install -r requirements.txt".

Hope your app will run fine !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants