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

An Exception happens when run with -w option #163

Open
nixlong opened this issue Oct 9, 2018 · 3 comments
Open

An Exception happens when run with -w option #163

nixlong opened this issue Oct 9, 2018 · 3 comments

Comments

@nixlong
Copy link

nixlong commented Oct 9, 2018

when run it with the -w option like this :

python3.6 japonicus-run -gw --strat XXXX

the exception happens:

`WEBSERVER MODE

  • Serving Flask app "promoterz.webServer.core" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: on
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
    File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
    File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 943, in run
    run_simple(host, port, self, **options)
    File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 812, in run_simple
    reloader_type)
    File "/usr/local/lib/python3.6/dist-packages/werkzeug/_reloader.py", line 267, in run_with_reloader
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
    File "/usr/lib/python3.6/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
    ValueError: signal only works in main thread
    `

how to fix it, pls help me, thx

@Gab0
Copy link
Owner

Gab0 commented Oct 10, 2018

Hey @nixlong, are you sure the webserver deps (dash, plotly and stuff) are updated to latest?
Maybe even something broke on the newer updates.
If the issue persists paste your versions here.
cheers!

@nixlong
Copy link
Author

nixlong commented Oct 12, 2018

hi @Gab0 :
my env:

  1. python 3.6 (pip 18.1 from py3.6)
  2. Gekko : v0.6.6 / branch stable
  3. japonicus : latest (0.91)
  4. other deps:

$ pip list | grep plotly
plotly 3.3.0

$ pip list | grep dash
dash 0.21.1
dash-core-components 0.22.1
dash-html-components 0.10.1
dash-renderer 0.14.1

thx

@Gab0
Copy link
Owner

Gab0 commented Oct 12, 2018

Hey, try with those (in order of importance)
Flask 1.0.2
dash 0.26.2
plotly 3.1.1
dash-core-components 0.28.1
dash-html-components 0.11.0
dash-renderer 0.13.2

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