WARNING: Do not use the development server in a production environment.
WARNING: Do not use the development server in a production environment. Launch DL,throw exception,What should I do?
@J-Zhujj : thanks for your interest in VisualDL. Can you paste the exception or a screenshot? That can help us find the issue better. Thank you 😁
i also got same warning. Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
- Debug mode: off
Traceback (most recent call last):
File "/usr/local/bin/flask", line 11, in
sys.exit(main()) File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 894, in main cli.main(args=args, prog_name=name) File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 557, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.4/dist-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args[1:], **kwargs) File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 767, in run_command app = DispatchingApp(info.load_app, use_eager_loading=eager_loading) File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 293, in init self._load_unlocked() File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 317, in _load_unlocked self._app = rv = self.loader() File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 372, in load_app app = locate_app(self, import_name, name) File "/usr/local/lib/python3.4/dist-packages/flask/cli.py", line 235, in locate_app import(module_name) File "/home/hana/Flasks_apps/sample.py", line 3 @app.route(‘/sample’) ^ SyntaxError: invalid character in identifier
C:\Users\yogesh\Desktop\python programming> python website1.py
* Serving Flask app "website1" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 672-977-358
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [14/Jun/2018 05:55:44] "GET / HTTP/1.1" 200 `-```
I got this warning error ..!! Does it have any significance or not? Thank you
Same warning.
flask run
- 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
Traceback (most recent call last):
File "c:\users\milan\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\milan\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Milan\AppData\Local\Programs\Python\Python36-32\Scripts\flask.exe_main.py", line 9, in
File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 894, in main cli.main(args=args, prog_name=name) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 557, in main return super(FlaskGroup, self).main(*args, **kwargs) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args[1:], **kwargs) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 767, in run_command app = DispatchingApp(info.load_app, use_eager_loading=eager_loading) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 293, in init self._load_unlocked() File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 317, in _load_unlocked self._app = rv = self.loader() File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 372, in load_app app = locate_app(self, import_name, name) File "c:\users\milan\appdata\local\programs\python\python36-32\lib\site-packages\flask\cli.py", line 235, in locate_app import(module_name) File "C:\test\application.py", line 1 import flask from Flask ^ SyntaxError: invalid syntax
Same
(CodexA) 192:~ NVDL$ flask run
- Serving Flask app "kerasvis.runserver"
- Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
- Debug mode: off Usage: flask run [OPTIONS]
Error: While importing "kerasvis.runserver", an ImportError was raised:
Traceback (most recent call last):
File "/anaconda3/envs/CodexA/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app
import(module_name)
File "/anaconda3/envs/CodexA/lib/python3.6/site-packages/kerasvis/runserver.py", line 1, in
(CodexA) 192:~ NVDL$ pip install flask Requirement already satisfied: flask in /anaconda3/envs/CodexA/lib/python3.6/site-packages (1.0.2) Requirement already satisfied: Werkzeug>=0.14 in /anaconda3/envs/CodexA/lib/python3.6/site-packages (from flask) (0.14.1) Requirement already satisfied: itsdangerous>=0.24 in /anaconda3/envs/CodexA/lib/python3.6/site-packages (from flask) (0.24) Requirement already satisfied: Jinja2>=2.10 in /anaconda3/envs/CodexA/lib/python3.6/site-packages (from flask) (2.10) Requirement already satisfied: click>=5.1 in /anaconda3/envs/CodexA/lib/python3.6/site-packages (from flask) (6.7) Requirement already satisfied: MarkupSafe>=0.23 in /anaconda3/envs/CodexA/lib/python3.6/site-packages (from Jinja2>=2.10->flask) (1.0) (CodexA) 192:~ NVDL$
Try to start the server with the development env.
$ export FLASK_APP=yourapp
$ export FLASK_ENV=development
and then you start the server with:
$ flask run
in flask configuration class add :
ENV = ""
like :
DEBUG = True
I am getting the same error not sure whats going on
WARNING: Do not use the development server in a production environment.
Is only a warning. Then means, if you run your site in the world wide web... then don't activate the developement mode on THAT specific server, for security reasons.
And if you added the environment variables make sure you add them as a user or global enviroment varialble... depends of the user you use.
I get this error while trying to run the application from Miguel Grinberg
flask.cli.NoAppException: Could not import "microblog".
Traceback (most recent call last) File "/Users/eliyahusternberg/Desktop/sign_in/venv/lib/python3.6/site-packages/flask/cli.py", line 330, in call rv = self._load_unlocked() File "/Users/eliyahusternberg/Desktop/sign_in/venv/lib/python3.6/site-packages/flask/cli.py", line 317, in _load_unlocked self._app = rv = self.loader() File "/Users/eliyahusternberg/Desktop/sign_in/venv/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app app = locate_app(self, import_name, name) File "/Users/eliyahusternberg/Desktop/sign_in/venv/lib/python3.6/site-packages/flask/cli.py", line 246, in locate_app 'Could not import "{name}".'.format(name=module_name) flask.cli.NoAppException: Could not import "microblog".
Thanks however I still get an import error when I go to http://localhost:5000/index.
On Thu, Sep 6, 2018 at 7:44 PM, Ben Schley [email protected] wrote:
WARNING: Do not use the development server in a production environment.
Is only a warning. Then means, if you run your site in the world wide web... then don't activate the developement mode on THAT specific server, for security reasons.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PaddlePaddle/VisualDL/issues/446#issuecomment-419276101, or mute the thread https://github.com/notifications/unsubscribe-auth/AfutDt_DXLUUAbyZUSUFs0TeTBBYbDAEks5uYbNqgaJpZM4T0Vym .
In case of window use set at the place of export:- set FLASK_ENV=development flask run and then run your python file
Thanks
On Sep 6, 2018 7:44 PM, "Ben Schley" [email protected] wrote:
WARNING: Do not use the development server in a production environment.
Is only a warning. Then means, if you run your site in the world wide web... then don't activate the developement mode on THAT specific server, for security reasons.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PaddlePaddle/VisualDL/issues/446#issuecomment-419276101, or mute the thread https://github.com/notifications/unsubscribe-auth/AfutDt_DXLUUAbyZUSUFs0TeTBBYbDAEks5uYbNqgaJpZM4T0Vym .
env FLASK_ENV=development FLASK_APP=hello.py flask run
hello you can give me a hand on a telegram bot
when I start the bot app.py this screen comes to me pi@admin:~/fastcoinbot $ python3 app.py 2018-10-21 17:40:27,505 - super-bot - INFO - Starting bot 2018-10-21 17:40:27,505 - super-bot - INFO - Load config 2018-10-21 17:40:27,507 - super-bot - INFO - Connect to Telegram 2018-10-21 17:40:27,510 - super-bot - INFO - Collect modules 2018-10-21 17:40:27,938 - super-bot - INFO - Ready
- Serving Flask app "app" (lazy loading)
- Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
- Debug mode: off 2018-10-21 17:40:27,992 - werkzeug - INFO - * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
I had the same issue . I solved it by just running the ip address as an argument within flask
app.run('localhost', 5000)
I had the same issue . I solved it by just running the ip address as an argument within flask
app.run('localhost', 5000)
it well done
In case of window use set at the place of export:- set FLASK_ENV=development flask run and then run your python file
Thanks this really works.