Hello,
I intentended to use the toolbox filters in my local galaxy instance v. 16.04. To get a first impression, I did the following:
- Read the documention
- uncommented the "user_tool_filters*" lines in the galaxy.ini
- moved lib/galaxy/tools/toolbox/filters/examples.py.sample to examples.py
When I tried to apply the filters in Users->Preferencees->Manage Toolbox Filters it got the following error:
"Error - <type 'exceptions.importerror'="">: No module named examples
URL: http://vm-113.de:8080/user/toolbox_filters?cntrller=user sys.path: [ '/opt/galaxy/scripts', enter code here '/opt/galaxy/lib', enter code here '/opt/galaxy/.venv/lib64/python27.zip', '/opt/galaxy/.venv/lib64/python2.7', '/opt/galaxy/.venv/lib64/python2.7/plat-linux2', '/opt/galaxy/.venv/lib64/python2.7/lib-tk', '/opt/galaxy/.venv/lib64/python2.7/lib-old', '/opt/galaxy/.venv/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7', '/usr/lib/python2.7', '/opt/galaxy/.venv/lib/python2.7/site-packages'] File '/opt/galaxy/lib/galaxy/web/framework/middleware/error.py', line 151 in __call__ app_iter = self.application(environ, sr_checker) File '/opt/galaxy/.venv/lib/python2.7/site-packages/paste/recursive.py', line 85 in __call__ return self.application(environ, start_response) File '/opt/galaxy/.venv/lib/python2.7/site-packages/paste/httpexceptions.py', line 640 in __call__ return self.application(environ, start_response) File '/opt/galaxy/lib/galaxy/web/framework/base.py', line 131 in __call__ return self.handle_request( environ, start_response ) File '/opt/galaxy/lib/galaxy/web/framework/base.py', line 190 in handle_request body = method( trans, *kwargs ) File '/opt/galaxy/lib/galaxy/web/framework/decorators.py', line 65 in decorator return func( self, trans, *args, *kwargs ) File '/opt/galaxy/lib/galaxy/webapps/galaxy/controllers/user.py', line 1331 in toolbox_filters tool_filters = get_filter_mapping( saved_user_tool_filters, trans.app.config.user_tool_filters ) File '/opt/galaxy/lib/galaxy/webapps/galaxy/controllers/user.py', line 1284 in get_filter_mapping module = __import__( module_name, globals(), fromlist=['temp_module'] )
ImportError: No module named examples"
What did I miss? How can I fix the problem? Any help is welcome.
Regards, Anne
What happens if the server is restarted?
unfortunately, the message stays the same.
Hi Anne
Try moving "examples.py" to lib/galaxy/tools/filters/ (and restart again)
see also: https://wiki.galaxyproject.org/UserDefinedToolboxFilters#For_Administrators
Regards, Hans-Rudolf
Hello Hans,
bingo, that does the the trick. Thank you! Just a little remark for a more user-friendly "documentation". In the galaxy.ini script there is a line: "user_tool_filters = examples:restrict_upload_to_admins, examples:restrict_encode", but my examples.py(.samples) does not contain a definition for "restrict_encode" and therefore complains about the missing module. Ok, this is a quite obvious issue to solve, but I think it would be helpful to bring bring back the example from the wiki or adjust the galaxy.ini file accordingly.
The thread can be closed :)