Galaxy: Mako on Python 3

Created on 11 Sep 2019  路  4Comments  路  Source: galaxyproject/galaxy

I'm using Galaxy release 19.09 and Python 3.7.
I'm trying to access the main page and get the following error:

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 "GLXFOLDER/.venv/lib/python3.7/site-packages/paste/recursive.py", line 85, in __call__
    return self.application(environ, start_response)
  File "GLXFOLDER/.venv/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 222, in handle_request
    body = method(trans, **kwargs)
  File "lib/galaxy/webapps/galaxy/controllers/root.py", line 79, in index
    return self._bootstrapped_client(trans)
  File "lib/galaxy/webapps/base/controller.py", line 281, in _bootstrapped_client
    return self.template(trans, app_name, options=js_options, **kwd)
  File "lib/galaxy/webapps/base/controller.py", line 360, in template
    masthead=masthead
  File "lib/galaxy/web/framework/webapp.py", line 936, in fill_template
    return self.fill_template_mako(filename, **kwargs)
  File "lib/galaxy/web/framework/webapp.py", line 949, in fill_template_mako
    return template.render(**data)
  File "GLXFOLDER/.venv/lib/python3.7/site-packages/mako/template.py", line 476, in render
    return runtime._render(self, self.callable_, args, data)
  File "GLXFOLDER/.venv/lib/python3.7/site-packages/mako/runtime.py", line 883, in _render
    **_kwargs_for_callable(callable_, data)
  File "GLXFOLDER/.venv/lib/python3.7/site-packages/mako/runtime.py", line 920, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "GLXFOLDER/.venv/lib/python3.7/site-packages/mako/runtime.py", line 947, in _exec_template
    callable_(context, *args, **kwargs)
  File "GLXFOLDER/database/compiled_templates/js-app.mako.py", line 52, in render_body
    __M_writer(unicode( h.url_for( '/' ) ))
NameError: name 'unicode' is not defined

Most helpful comment

Did you try to clean-up the directory with rm -rf database/compiled_templates/ and restart Galaxy?

All 4 comments

After running the following command I see the homepage:

2to3 -w database/compiled_templates/js-app.mako.py

I'm resorting to

2to3 -w database/compiled_templates/*.py

Did you try to clean-up the directory with rm -rf database/compiled_templates/ and restart Galaxy?

That seems to work. Sorry for this, I totally forgot about that.

Was this page helpful?
0 / 5 - 0 ratings