mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
27971c094374764f916b649fe05fde0d93e289f5
Move session lookup into try/except, user will then just get a new
session. Fixes
```
127.0.0.1 - - [25/Jul/2019:13:24:23 +0200] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36"
Traceback (most recent call last):
File "lib/galaxy/web/framework/middleware/error.py", line 154, in __call__
app_iter = self.application(environ, sr_checker)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/paste/recursive.py", line 85, in __call__
return self.application(environ, start_response)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/paste/httpexceptions.py", line 640, in __call__
return self.application(environ, start_response)
File "lib/galaxy/web/framework/base.py", line 143, in __call__
return self.handle_request(environ, start_response)
File "lib/galaxy/web/framework/base.py", line 199, in handle_request
trans = self.transaction_factory(environ)
File "lib/galaxy/web/framework/webapp.py", line 82, in <lambda>
self.set_transaction_factory(lambda e: self.transaction_chooser(e, galaxy_app, session_cookie))
File "lib/galaxy/web/framework/webapp.py", line 115, in transaction_chooser
return GalaxyWebTransaction(environ, galaxy_app, self, session_cookie)
File "lib/galaxy/web/framework/webapp.py", line 219, in __init__
self._ensure_valid_session(session_cookie)
File "lib/galaxy/web/framework/webapp.py", line 446, in _ensure_valid_session
self.app.model.GalaxySession.table.c.is_valid == true())).options(joinedload("user")).first()
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3222, in first
ret = list(self[0:1])
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3012, in __getitem__
return list(res)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3324, in __iter__
return self._execute_and_instances(context)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3349, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1468, in _handle_dbapi_exception
util.reraise(*exc_info)
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 154, in reraise
raise value
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
File "/Users/mvandenb/src/galaxy/.venv3/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
cursor.execute(statement, parameters)
ValueError: A string literal cannot contain NUL (0x00) characters.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "lib/galaxy/web/framework/middleware/batch.py", line 80, in __call__
return self.application(environ, start_response)
File "lib/galaxy/web/framework/middleware/request_id.py", line 15, in __call__
return self.app(environ, start_response)
File "lib/galaxy/web/framework/middleware/xforwardedhost.py", line 23, in __call__
return self.app(environ, start_response)
File "lib/galaxy/web/framework/middleware/translogger.py", line 71, in __call__
return self.application(environ, replacement_start_response)
File "lib/galaxy/web/framework/middleware/error.py", line 164, in __call__
exc_info)
File "lib/galaxy/web/framework/middleware/translogger.py", line 70, in replacement_start_response
return start_response(status, headers, exc_info)
SystemError: <built-in function uwsgi_spit> returned a result with an error set
```
Which can be provoked by switching between python 3 and python 2.
.. figure:: https://galaxyproject.org/images/galaxy-logos/galaxy_project_logo.jpg
:alt: Galaxy Logo
The latest information about Galaxy can be found on the `Galaxy Community Hub <https://galaxyproject.org/>`__.
Community support is available at `Galaxy Help <https://help.galaxyproject.org/>`__.
.. image:: https://img.shields.io/badge/chat-irc.freenode.net%23galaxyproject-blue.svg
:target: https://webchat.freenode.net/?channels=galaxyproject
:alt: Chat on irc
.. image:: https://img.shields.io/badge/chat-gitter-blue.svg
:target: https://gitter.im/galaxyproject/Lobby
:alt: Chat on gitter
.. image:: https://img.shields.io/badge/release-documentation-blue.svg
:target: https://docs.galaxyproject.org/en/master/
:alt: Release Documentation
.. image:: https://travis-ci.org/galaxyproject/galaxy.svg?branch=dev
:target: https://travis-ci.org/galaxyproject/galaxy
:alt: Inspect the test results
Galaxy Quickstart
=================
Galaxy requires Python 2.7 To check your python version, run:
.. code:: console
$ python -V
Python 2.7.3
Start Galaxy:
.. code:: console
$ sh run.sh
Once Galaxy completes startup, you should be able to view Galaxy in your
browser at:
http://localhost:8080
Configuration & Tools
=====================
You may wish to make changes from the default configuration. This can be
done in the ``config/galaxy.ini`` file.
Tools can be either installed from the Tool Shed or added manually.
For details please see the `tutorial <https://galaxyproject.org/admin/tools/add-tool-from-toolshed-tutorial/>`__.
Note that not all dependencies for the tools provided in the
``tool_conf.xml.sample`` are included. To install them please visit
"Manage dependencies" in the admin interface.
Issues and Galaxy Development
=============================
Please see `CONTRIBUTING.md <CONTRIBUTING.md>`_ .
Roadmap
=============================
Interested in the next steps for Galaxy? Take a look at the `roadmap <https://github.com/galaxyproject/galaxy/projects/8>`__.
Languages
Python
64.2%
TypeScript
14.5%
Vue
12.5%
JavaScript
3.7%
Jupyter Notebook
2.4%
Other
2.5%