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

20.01 + python3, error starting reports webapp #9461

Closed
abretaud opened this issue Feb 28, 2020 · 7 comments
Closed

20.01 + python3, error starting reports webapp #9461

abretaud opened this issue Feb 28, 2020 · 7 comments

Comments

@abretaud
Copy link
Contributor

Hi,
I made a quick test on my dev server to update to 20.01 + switch to python3. I removed .venv, and at startup it successfully created the galaxy conda env, and the new .venv virtualenv. But I get this error when starting the report webapp:

galaxy.webapps.util DEBUG 2020-02-28 17:32:40,532 [p:6566,w:0,m:0] [MainThread] Enabling 'paste.httpexceptions' middleware
galaxy.webapps.util DEBUG 2020-02-28 17:32:40,534 [p:6566,w:0,m:0] [MainThread] Enabling 'RecursiveMiddleware' middleware
galaxy.webapps.util DEBUG 2020-02-28 17:32:40,549 [p:6566,w:0,m:0] [MainThread] Enabling 'ErrorMiddleware' middleware
galaxy.webapps.util DEBUG 2020-02-28 17:32:40,551 [p:6566,w:0,m:0] [MainThread] Enabling 'TransLogger' middleware
galaxy.webapps.util DEBUG 2020-02-28 17:32:40,554 [p:6566,w:0,m:0] [MainThread] Enabling 'XForwardedHostMiddleware' middleware
galaxy.webapps.util WARNING 2020-02-28 17:32:40,554 [p:6566,w:0,m:0] [MainThread] 'wrap_in_static' is enabled in your configuration but the uWSGI application stack does not support it, this middleware has been disabled
WSGI app 0 (mountpoint='') ready in 5 seconds on interpreter 0x55c8f8e960d0 pid: 6566 (default app)
mounting galaxy.webapps.reports.buildapp:uwsgi_app() on /reports
added lib/ to pythonpath.
Traceback (most recent call last):
  File "lib/galaxy/webapps/reports/buildapp.py", line 12, in <module>
    import galaxy.model.mapping
  File "lib/galaxy/model/mapping.py", line 41, in <module>
    from galaxy.model.custom_types import JSONType, MetadataType, TrimmedString, UUIDType
  File "lib/galaxy/model/custom_types.py", line 10, in <module>
    import numpy
  File "/opt/galaxy_dev/galaxy-dist/.venv/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/opt/galaxy_dev/galaxy-dist/.venv/lib/python3.6/site-packages/numpy/core/__init__.py", line 40, in <module>
    from . import multiarray
  File "/opt/galaxy_dev/galaxy-dist/.venv/lib/python3.6/site-packages/numpy/core/multiarray.py", line 13, in <module>
    from . import overrides
  File "/opt/galaxy_dev/galaxy-dist/.venv/lib/python3.6/site-packages/numpy/core/overrides.py", line 46, in <module>
    """)
RuntimeError: implement_array_function method already has a docstring
unable to load app 1 (mountpoint='/reports') (callable not found or import error)
*** daemonizing uWSGI ***

No error when starting galaxy though

@mvdbeek
Copy link
Member

mvdbeek commented Feb 28, 2020

Hmm, that looks like a dependency issue. Can you check what version of numpy this is, and maybe re-install it ?

@abretaud
Copy link
Contributor Author

abretaud commented Mar 2, 2020

Strange, numpy==1.16.5 is installed in the venv, the same as in requirements.txt.
I tried uninstalling/reinstalling, but still the same problem

@mvdbeek
Copy link
Member

mvdbeek commented Mar 2, 2020

Looks like numpy/numpy#14384 :/

@abretaud
Copy link
Contributor Author

abretaud commented Mar 2, 2020

Arf, looks complicated
I'm surprised that I only get it with reports and not galaxy itself

@mvdbeek
Copy link
Member

mvdbeek commented Mar 2, 2020

surprisingly it works fine for me with uwsgi and python 3.6 -- but there's is a linked commit that suggests that 1.15.4 works. Could you try that ?

@abretaud
Copy link
Contributor Author

abretaud commented Mar 2, 2020

So, using 1.15.4, I get another error:

galaxy.webapps.util DEBUG 2020-03-02 11:33:46,438 [p:6620,w:0,m:0] [MainThread] Enabling 'paste.httpexceptions' middleware
galaxy.webapps.util DEBUG 2020-03-02 11:33:46,440 [p:6620,w:0,m:0] [MainThread] Enabling 'RecursiveMiddleware' middleware
galaxy.webapps.util DEBUG 2020-03-02 11:33:46,448 [p:6620,w:0,m:0] [MainThread] Enabling 'ErrorMiddleware' middleware
galaxy.webapps.util DEBUG 2020-03-02 11:33:46,449 [p:6620,w:0,m:0] [MainThread] Enabling 'TransLogger' middleware
galaxy.webapps.util DEBUG 2020-03-02 11:33:46,450 [p:6620,w:0,m:0] [MainThread] Enabling 'XForwardedHostMiddleware' middleware
galaxy.webapps.util WARNING 2020-03-02 11:33:46,450 [p:6620,w:0,m:0] [MainThread] 'wrap_in_static' is enabled in your configuration but the uWSGI application stack does not support it, this middleware has been disabled
WSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x55ff90c4c0d0 pid: 6620 (default app)
mounting galaxy.webapps.reports.buildapp:uwsgi_app() on /reports
added lib/ to pythonpath.
Traceback (most recent call last):
  File "lib/galaxy/webapps/reports/buildapp.py", line 135, in uwsgi_app
    return galaxy.web.framework.webapp.build_native_uwsgi_app(app_factory, "reports")
  File "lib/galaxy/web/framework/webapp.py", line 995, in build_native_uwsgi_app
    uwsgi_app = paste_factory({}, load_app_kwds=app_kwds)
  File "lib/galaxy/webapps/reports/buildapp.py", line 62, in app_factory
    add_ui_controllers(webapp, app)
  File "lib/galaxy/webapps/reports/buildapp.py", line 30, in add_ui_controllers
    from galaxy.webapps.base.controller import BaseUIController
  File "lib/galaxy/webapps/base/controller.py", line 21, in <module>
    from galaxy.datatypes.interval import ChromatinInteractions
  File "lib/galaxy/datatypes/interval.py", line 9, in <module>
    from bx.intervals.io import GenomicIntervalReader, ParseError
  File "/opt/galaxy_dev/galaxy-dist/.venv/lib/python3.6/site-packages/bx/intervals/__init__.py", line 7, in <module>
    from bx.intervals.intersection import *  # noqa: F40
ImportError: Interpreter change detected - this module can only be loaded into one interpreter per process.
unable to load app 1 (mountpoint='/reports') (callable not found or import error)
*** daemonizing uWSGI **

I got it running by switching back to 1.16.5 and adding this to reports.yml:

  single-interpreter: true

@martenson
Copy link
Member

this is likely resolved or outdated

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

3 participants