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

Not working for me #9

Open
INGourav opened this issue Jul 16, 2021 · 1 comment
Open

Not working for me #9

INGourav opened this issue Jul 16, 2021 · 1 comment

Comments

@INGourav
Copy link

root@829e3edc10af:/opt# FLASK_APP=app.py flask run --host=0.0.0.0

  • Serving Flask app 'app.py' (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: off
    Traceback (most recent call last):
    File "/usr/local/bin/flask", line 8, in
    sys.exit(main())
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 990, in main
    cli.main(args=sys.argv[1:])
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 596, in main
    return super().main(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
    File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 845, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 321, in init
    self._load_unlocked()
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 346, in _load_unlocked
    self._app = rv = self.loader()
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 402, in load_app
    app = locate_app(self, import_name, name)
    File "/usr/local/lib/python3.8/dist-packages/flask/cli.py", line 256, in locate_app
    import(module_name)
    File "/opt/app.py", line 9
    @app.route('/how are you')
    ^
    IndentationError: unindent does not match any outer indentation level
@sreelekshmi-Raj
Copy link

@INGourav Please try this solution
$ export FLASK_DEBUG=1
$ export FLASK_APP=app.py
$ export FLASK_ENV=development
Then start web server using
$ python3 -m flask run --host=0.0.0.0

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

2 participants