Question: Error invoking workflow with bioblend: TypeError: expected string or buffer
1
gravatar for felix
11 months ago by
felix10
felix10 wrote:

Hi,

I try to invoke a workflow in my local Galaxy instance using bioblend. I have a history containing the three input files. If I start the workflow in the browser the workflow runs fine.

If I use bioblend to start the workflow the first steps of the workflow are ok, but an error occurs alway at the same step:

galaxy.jobs.runners ERROR 2017-07-19 15:19:29,114 (122) Failure preparing job
Traceback (most recent call last):
  File "/galaxy/lib/galaxy/jobs/runners/__init__.py", line 170, in prepare_job
    job_wrapper.prepare()
  File "/galaxy/lib/galaxy/jobs/__init__.py", line 967, in prepare
    tool_evaluator.set_compute_environment( compute_environment, get_special=get_special )
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 72, in set_compute_environment
    visit_input_values( self.tool.inputs, incoming, validate_inputs )
  File "/galaxy/lib/galaxy/tools/parameters/__init__.py", line 109, in visit_input_values
    visit_input_values( input.inputs, values, callback, new_name_prefix, label_prefix, parent_prefix=name_prefix, **payload )
  File "/galaxy/lib/galaxy/tools/parameters/__init__.py", line 111, in visit_input_values
    callback_helper( input, input_values, name_prefix, label_prefix, parent_prefix=parent_prefix, context=context )
  File "/galaxy/lib/galaxy/tools/parameters/__init__.py", line 76, in callback_helper
    new_value = callback( **args )
  File "/galaxy/lib/galaxy/tools/evaluation.py", line 71, in validate_inputs
    input.validate( value, request_context )
  File "/galaxy/lib/galaxy/tools/parameters/basic.py", line 266, in validate
    return super( TextToolParameter, self ).validate( value, trans )
  File "/galaxy/lib/galaxy/tools/parameters/basic.py", line 200, in validate
    validator.validate( value, trans )
  File "/galaxy/lib/galaxy/tools/parameters/validation.py", line 63, in validate
    if re.match( self.expression, value or '' ) is None:
  File "/galaxy/.venv/lib64/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

I invoke the workflow in bioblend like this:

wf_id = 'f2db41e1fa331b3e'

wf_input = {'a26d7898-9075-4a38-89be-e744b9927f9c':{'id':'a7db2fac67043c7e', 'src':'hda'}, '5d1b3519-4aff-4d87-a150-b05f1a438fe0':{'id':'4ff6f47412c3e65e', 'src':'hda'}, '5ecc66f0-bdcb-48d5-a325-785f6ea70760':{'id':'e89067bb68bee7a0', 'src':'hda'}}

wf_invocation = wfc.invoke_workflow(wf_id,
                inputs=wf_input,
                params=None,
                history_id=new_history_id,
                history_name=None,
                import_inputs_to_history=False,
                replacement_params=None,
                allow_tool_state_corrections=None)

Edit:

I'm running Galaxy 17.01. The tool that fails is bcftools_call v.1.4.0. The input datasets are not in a collection, they are just three single items in a history. I uploaded them with the 'Upload File' tool.

Any ideas why the workflow runs in the browser, but not with bioblend?

Thanks!

workflow bioblend galaxy • 382 views
ADD COMMENTlink modified 11 months ago • written 11 months ago by felix10

What step/tool is this failing at?

Including the Galaxy version in use and the tool version would be helpful. Also, are you using a Dataset collection for the input to this tool?

A related prior issue that involved this error coming from certain tools. And there is still an open issue for this use case in general (again, only impacts certain tools). It may be that the tool in use needs a modification. If so, we will want to capture that and resolve the problem.

Thanks for reporting the error and we can follow up from the additional info.

Jen, Galaxy team

ADD REPLYlink modified 11 months ago • written 11 months ago by Jennifer Hillman Jackson25k

Hi Jen, I added some information about the Galaxy version and the tool that fails to the question.

For me the difference between invoking the workflow from the browser and from bioblend with the same input (and no options changed) is not clear. Can you explain the difference during the workflow execution?

ADD REPLYlink written 11 months ago by felix10

Thanks for the additional info. I will test the tool and see if it has any settings that are not configured at workflow runtime. Feedback after testing.

The difference between the two methods has to do with the data available a runtime. There are a small number of tools that have form entries that are not tuned for workflow use (yet).

I will be testing in a 17_05 Galaxy as there are many changes, fixes, and upgrades between the two releases. It is strongly recommended that you upgrade to 17_05 as well.

ADD REPLYlink written 11 months ago by Jennifer Hillman Jackson25k

I tried the identical workflow with 17_05 Galaxy and the same error occurs. Thanks for your investigation!

ADD REPLYlink written 11 months ago by felix10

What is the status if this problem? I would be very happy to run my workflow with the API/bioblend. Should I open an issue on the Galaxy GitHub page?

ADD REPLYlink written 10 months ago by felix10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 91 users visited in the last hour