VisualDL icon indicating copy to clipboard operation
VisualDL copied to clipboard

WARNING: Do not use the development server in a production environment.

Open J-Zhujj opened this issue 8 years ago • 34 comments

WARNING: Do not use the development server in a production environment. Launch DL,throw exception,What should I do?

J-Zhujj avatar May 07 '18 03:05 J-Zhujj

@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 😁

daming-lu avatar May 07 '18 18:05 daming-lu

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

Haninini avatar Jun 02 '18 11:06 Haninini

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

codes67 avatar Jun 14 '18 09:06 codes67

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

kushmilan avatar Jun 17 '18 21:06 kushmilan

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 from kerasvis.server.main import app File "/anaconda3/envs/CodexA/lib/python3.6/site-packages/kerasvis/server/main.py", line 4, in from .plots import empty_plot, loss_accuracy_plot File "/anaconda3/envs/CodexA/lib/python3.6/site-packages/kerasvis/server/plots.py", line 3, in from bokeh.charts import Line ModuleNotFoundError: No module named 'bokeh.charts'

(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$

NKVDL avatar Jul 02 '18 20:07 NKVDL

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

bschley avatar Jul 14 '18 17:07 bschley

in flask configuration class add : ENV = ""

like : DEBUG = True

Rhyanz46 avatar Aug 01 '18 07:08 Rhyanz46

I am getting the same error not sure whats going on

eliyahusternberg avatar Sep 06 '18 23:09 eliyahusternberg

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.

bschley avatar Sep 06 '18 23:09 bschley

I get this error while trying to run the application from Miguel Grinberg

eliyahusternberg avatar Sep 06 '18 23:09 eliyahusternberg

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".

eliyahusternberg avatar Sep 06 '18 23:09 eliyahusternberg

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 .

eliyahusternberg avatar Sep 07 '18 00:09 eliyahusternberg

In case of window use set at the place of export:- set FLASK_ENV=development flask run and then run your python file

meenusheok avatar Sep 29 '18 06:09 meenusheok

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 .

eliyahusternberg avatar Oct 03 '18 00:10 eliyahusternberg

env FLASK_ENV=development FLASK_APP=hello.py flask run

qijunbo avatar Oct 10 '18 06:10 qijunbo

hello you can give me a hand on a telegram bot

enea1982 avatar Oct 21 '18 15:10 enea1982

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)

enea1982 avatar Oct 21 '18 16:10 enea1982

I had the same issue . I solved it by just running the ip address as an argument within flask

app.run('localhost', 5000)

raymanbigD avatar May 27 '19 14:05 raymanbigD

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

prigioni avatar Sep 08 '19 13:09 prigioni

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.

Lobsterrr avatar Nov 03 '19 01:11 Lobsterrr