def get_initial_value( self, trans, context, history=None ):There is another problem though.
rval = []
for i in range( self.default ):
rval_dict = { '__index__': i}
for input in self.inputs.itervalues():
rval_dict[ input.name ] = input.get_initial_value( trans, context, history )
rval.append( rval_dict )
return rval
Yes, indeed,
the log from galaxy are the following:
The first error was due to the fact that bioblend function run_tools; gave galaxy a dump of the input_dicts which type is string where galaxy was waiting for an item structure.
I removed the dump:
payload["inputs"] = tool_inputs
instead of
payload["inputs"] = dumps(tool_inputs)
However, there is another error afterwards which is:
___________________________________________________________________
/home/odoppelt/localStuff_VM/tools/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.7-linux-x86_64-ucs4.egg/sqlalchemy/types.py:215: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage.
galaxy.web.framework ERROR 2014-02-24 15:15:15,374 Uncaught exception in exposed API method:
Traceback (most recent call last):
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/web/framework/__init__.py", line 203, in decorator
rval = func( self, trans, *args, **kwargs)
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/webapps/galaxy/api/tools.py", line 123, in create
template, vars = tool.handle_input( trans, params.__dict__, history=target_history )
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/__init__.py", line 1921, in handle_input
state = self.new_state( trans, history=history )
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/__init__.py", line 1846, in new_state
self.fill_in_new_state( trans, inputs, state.inputs, history=history )
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/__init__.py", line 1855, in fill_in_new_state
state[ input.name ] = input.get_initial_value( trans, context, history=history )
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/parameters/grouping.py", line 116, in get_initial_value
rval_dict[ input.name ] = input.get_initial_value( trans, context )
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/parameters/basic.py", line 1657, in get_initial_value
return self.get_initial_value_from_history_prevent_repeats(trans, context, None, history=history);
File "/home/odoppelt/localStuff_VM/tools/galaxy-dist/lib/galaxy/tools/parameters/basic.py", line 1670, in get_initial_value_from_history_prevent_repeats
assert history is not None, "DataToolParameter requires a history"
AssertionError: DataToolParameter requires a history
127.0.0.1 - - [24/Feb/2014:15:15:15 +0200] "POST /api/tools?key=cd065330048989af4ae266cf94685e6b HTTP/1.1" 500 - "-" "python-requests/2.0.1 CPython/2.7.5+ Linux/3.11.0-15-generic"
___________________________________________________________________
Thanks for your help,
Olivia Doppelt-Azeroual
Le 24/02/14 15:21, John Chilton a écrit :
Hard to infer much from this, usually when I get this error there is a
full stack trace for this error in the Galaxy logs giving some
indication what went wrong.
-John
On Mon, Feb 24, 2014 at 4:36 AM, Olivia Doppelt-Azeroual
<olivia.doppelt@pasteur.fr> wrote:
Hello John,
Yes it helps a little but I still have the following error:
_______________________________________________________________________
Traceback (most recent call last):
File "script_testBioblend_distant.py", line 16, in <module>
giLocal.tools.run_tool(history_id='0a248a1f62a0cc04',tool_id='export',tool_inputs=tool_inputs_loc)
File
"/home/odoppelt/localStuff_VM/galaxy_work/SBW_project/bioblend/bioblend/galaxy/tools/__init__.py",
line 26, in run_tool
return Client._post(self, payload)
File
"/home/odoppelt/localStuff_VM/galaxy_work/SBW_project/bioblend/bioblend/galaxy/client.py",
line 181, in _post
r = self.gi.make_post_request(url, payload=payload,
files_attached=files_attached)
File
"/home/odoppelt/localStuff_VM/galaxy_work/SBW_project/bioblend/bioblend/galaxyclient.py",
line 94, in make_post_request
r.status_code, body=r.text) # @see self.body for HTTP response body
bioblend.galaxy.client.ConnectionError: Unexpected response from galaxy:
500: <html>
<head><title>Internal Server Error</title></head>
<body>
<h1>Internal Server Error</h1>
<p>The server has either erred or is incapable of performing
the requested operation.
<br/>
<!-- --></p>
<hr noshade>
<div align="right">WSGI Server</div>
</body>
</html>
___________________________________________________________________________________________
I'm currently trying to understand this error. Please tell me if you know
anything about this error.
Have a nice day,
--
Olivia Doppelt-Azeroual, PhD
Tel: 92 15
CIB - Institut Pasteur
Le 21/02/14 15:49, John Chilton a écrit :
I copied the HTML into a new document, opened it, and copied the
stacktrace produced by Galaxy - it looks like this:
Internal Server Error
Galaxy was unable to successfully complete your request
URL:
http://galaxy.web.pasteur.fr/api/tools?key=c23d8cb98671911813305051710d4ae1
Module galaxy.web.framework.middleware.error:149 in __call__
Module paste.recursive:84 in __call__app_iter = self.application(environ, sr_checker)
Module galaxy.web.framework.middleware.remoteuser:96 in __call__return self.application(environ, start_response)
Module paste.httpexceptions:633 in __call__return self.app( environ, start_response )
Module galaxy.web.framework.base:132 in __call__return self.application(environ, start_response)
Module galaxy.web.framework.base:190 in handle_requestreturn self.handle_request( environ, start_response )
Module galaxy.web.framework:201 in decoratorbody = method( trans, **kwargs )
TypeError: exception() got an unexpected keyword argument 'exc_info'log.exception( 'Uncaught exception in exposed API method:'+
str(err),exc_info=True)
So what is happening here is and error is occurring when Galaxy is
trying to log another error - causing the API to break down. I don't
think the newest release of Galaxy has this line:
log.exception( 'Uncaught exception in exposed API method:'+
str(err),exc_info=True)
I am not sure what exc_info is - but it looks like it shouldn't be
there. You may want to remove that and see if you get a cleaner error
message that is easier to interpret.
Hope this helps.
-John
On Fri, Feb 21, 2014 at 3:50 AM, Olivia Doppelt
<olivia.doppelt@pasteur.fr> wrote:
Dear Developers,
I would like to use bioblend to export the result of a galaxy workflow.
To do that, we want to use an implemented tool called export_data; which
enables the copy of a result file from galaxy arborescence to a local
directory which belong to the user making the analysis and the export.
We tried to launch this tool using the run_tool function but it doesn't
work.
giOlivia.tools.run_tool(history_id='xxxxxxxxxxx',tool_id='yyyyyyyy/export_data/export/2.2',tool_inputs={'input':'id_data','name':"data"})
I get an error message which is very long and attached to this email.
Please help me on that it is the final step of several ones using
bioblend.
Have a nice day,
--
Olivia Doppelt-Azeroual, PhD
Tel: 92 15
CIB - Institut Pasteur
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client. To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at:
http://galaxyproject.org/search/mailinglists/
-- Olivia Doppelt-Azeroual, PhD Tel: 92 15 CIB - Institut Pasteur