[galaxyproject/galaxy] 77bcca: Python3: make encoded id JSON-serializable
Branch: refs/heads/dev Home: https://github.com/galaxyproject/galaxy Commit: 77bcca49a393ab4a181efae7c55fc06ee7494543 https://github.com/galaxyproject/galaxy/commit/77bcca49a393ab4a181efae7c55fc... Author: Nicola Soranzo <nicola.soranzo@earlham.ac.uk> Date: 2018-02-05 (Mon, 05 Feb 2018) Changed paths: M lib/galaxy/web/security/__init__.py Log Message: ----------- Python3: make encoded id JSON-serializable Fix the following traceback when visiting the Galaxy homepage: ``` Error - <class 'TypeError'>: b'f5cd946f78fsbc0d' is not JSON serializable URL: http://127.0.0.1:8080/ File 'lib/galaxy/web/framework/middleware/error.py', line 157 in __call__ app_iter = self.application(environ, sr_checker) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/paste/recursive.py', line 85 in __call__ return self.application(environ, start_response) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/paste/httpexceptions.py', line 640 in __call__ return self.application(environ, start_response) File 'lib/galaxy/web/framework/base.py', line 137 in __call__ return self.handle_request(environ, start_response) File 'lib/galaxy/web/framework/base.py', line 216 in handle_request body = method(trans, **kwargs) File 'lib/galaxy/webapps/galaxy/controllers/root.py', line 112 in index return self.template(trans, 'analysis', options=js_options) File 'lib/galaxy/web/base/controller.py', line 325 in template masthead=masthead File 'lib/galaxy/web/framework/webapp.py', line 920 in fill_template return self.fill_template_mako(filename, **kwargs) File 'lib/galaxy/web/framework/webapp.py', line 934 in fill_template_mako return template.render(**data) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/mako/template.py', line 445 in render return runtime._render(self, self.callable_, args, data) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/mako/runtime.py', line 829 in _render **_kwargs_for_callable(callable_, data)) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/mako/runtime.py', line 864 in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/.venv3/lib/python3.4/site-packages/mako/runtime.py', line 890 in _exec_template callable_(context, *args, **kwargs) File '/usr/users/ga002/soranzon/software/nsoranzo_galaxy/database/compiled_templates/js-app.mako.py', line 75 in render_body __M_writer(str( h.dumps( options ) )) File 'lib/galaxy/util/json.py', line 79 in safe_dumps dumped = json.dumps(*args, allow_nan=False, **kwargs) File '/usr/lib/python3.4/json/__init__.py', line 237 in dumps **kw).encode(obj) File '/usr/lib/python3.4/json/encoder.py', line 192 in encode chunks = self.iterencode(o, _one_shot=True) File '/usr/lib/python3.4/json/encoder.py', line 250 in iterencode return _iterencode(o, 0) File '/usr/lib/python3.4/json/encoder.py', line 173 in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'f5cd946f78fsbc0d' is not JSON serializable ``` Commit: b3ea83929fc67f656c30aed865d26a5575cc19c7 https://github.com/galaxyproject/galaxy/commit/b3ea83929fc67f656c30aed865d26... Author: Nicola Soranzo <nicola.soranzo@earlham.ac.uk> Date: 2018-02-07 (Wed, 07 Feb 2018) Changed paths: M test/functional/twilltestcase.py Log Message: ----------- Unicodify the return value of TwillTestCase.last_page() inside the check_page_for_string() method. Fix the following stacktrace during ToolShed tests: ``` Traceback (most recent call last): File "/usr/lib/python2.7/unittest/case.py", line 329, in run testMethod() File "/galaxy/test/shed_functional/functional/test_1160_tool_help_images.py", line 79, in test_0010_load_tool_page self.load_display_tool_page(repository, tool_path, changeset_revision, strings_displayed=[image_path], strings_not_displayed=[]) File "/galaxy/test/shed_functional/base/twilltestcase.py", line 1122, in load_display_tool_page self.check_for_strings(strings_displayed, strings_not_displayed) File "/galaxy/test/functional/twilltestcase.py", line 39, in check_for_strings self.check_page_for_string(string) File "/galaxy/test/functional/twilltestcase.py", line 69, in check_page_for_string if page.find(patt) == -1: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8760: ordinal not in range(128) ``` Commit: 43d572558a5dc5747dac0a7fc824bef3af4a809a https://github.com/galaxyproject/galaxy/commit/43d572558a5dc5747dac0a7fc824b... Author: John Chilton <jmchilton@gmail.com> Date: 2018-02-07 (Wed, 07 Feb 2018) Changed paths: M lib/galaxy/web/security/__init__.py M test/functional/twilltestcase.py Log Message: ----------- Merge pull request #5461 from nsoranzo/python3 Python3: make encoded id JSON-serializable Compare: https://github.com/galaxyproject/galaxy/compare/3a7414acaca5...43d572558a5d
participants (1)
-
GitHub