Hi John,
Your patch works indeed. Issues--
Thanks,
Marc

-----Original Message-----
From: jmchil...@gmail.com [mailto:jmchil...@gmail.com] On Behalf Of John Chilton
Sent: Monday, December 03, 2012 2:58 PM
To: Marc Logghe
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] workflow input param issue

I am really very sorry about that. It seems this must be related to my pull 
request "fixing" multiple input tool parameters. I have spent some time this 
morning trying to reproduce your error, but I cannot.
That said I think I can fix it, this patch should work:

diff --git a/templates/workflow/run.mako b/templates/workflow/run.mako index 
c7cd138..175f148 100644
--- a/templates/workflow/run.mako
+++ b/templates/workflow/run.mako
@@ -243,9 +243,12 @@ if wf_parms:
             %if isinstance( param, DataToolParameter ):
                 %if ( prefix + param.name ) in step.input_connections_by_name:
                     <%
-                        conn = step.input_connections_by_name[ prefix
+ param.name ]
+                        conns = step.input_connections_by_name[
prefix + param.name ]
+                        if not isinstance(conns, list):
+                            conns = [conns]
+                        vals = ["Output dataset '%s' from step %d" %
(conn.output_name, int(conn.output_step.order_index)+1
                     %>
-                    Output dataset '${conn.output_name}' from step
${int(conn.output_step.order_index)+1}
+                    ${",".join(vals)}
                 %else:
                     ## FIXME: Initialize in the controller
                     <%

Can you apply the patch and tell me if it works? Probably a similar fix needs 
to be applied to display.mako also, but I want to be able to recreate the 
problem first or at least verify this fixes it.

-John

On Mon, Dec 3, 2012 at 4:45 AM, Marc Logghe <marc.log...@ablynx.com> wrote:
> Hi,
>
> I have a workflow that basically needs a select parameter as input. 2 
> steps in the workflow actually need the very same input. I don't think 
> there is a
> (easy) way to let the user only input the parameter once and that it 
> is passed to both steps.
>
> Anyhow, currently - as a workaround and not very user friendly - the 
> user needs to input the very same parameter twice, for each step where 
> that parameter is required.
>
> The first issue however, is that as soon as the first parameter is 
> set, the second is set as well apparently (they have the same name, 
> that could
> explain) which is fine, but not to the chosen one, eg. both are kind 
> of reset to default. No errors or something, simply reset, which makes 
> it impossible to enter the parameter.
>
>
>
> Next, I hoped to solve the issue by upgrading galaxy to the most 
> recent version. This was not the case since the workflow did not run 
> at all anymore, which brings me to the second issue (see exception dump 
> below).
>
> Any ideas anyone ?
>
> Thanks and regards,
>
> Marc
>
>
>
>
>
> Error - <type 'exceptions.AttributeError'>: 'list' object has no 
> attribute 'output_name'
>
> URL: http://smith:8889/workflow/run?id=4b187121143038ff
>
> File
> '/home/galaxy/galaxy-dev/eggs/Paste-1.6-py2.7.egg/paste/exceptions/err
> ormiddleware.py',
> line 143 in __call__
>
>   app_iter = self.application(environ, start_response)
>
> File 
> '/home/galaxy/galaxy-dev/eggs/Paste-1.6-py2.7.egg/paste/recursive.py',
> line 80 in __call__
>
>   return self.application(environ, start_response)
>
> File
> '/home/galaxy/galaxy-dev/eggs/Paste-1.6-py2.7.egg/paste/httpexceptions
> .py',
> line 632 in __call__
>
>   return self.application(environ, start_response)
>
> File '/home/galaxy/galaxy-dev/lib/galaxy/web/framework/base.py', line 
> 160 in __call__
>
>   body = method( trans, **kwargs )
>
> File
> '/home/galaxy/galaxy-dev/lib/galaxy/webapps/galaxy/controllers/workflo
> w.py',
> line 1523 in run
>
>   
> enable_unique_defaults=trans.app.config.enable_unique_workflow_default
> s)
>
> File '/home/galaxy/galaxy-dev/lib/galaxy/web/framework/__init__.py', 
> line
> 836 in fill_template
>
>   return self.fill_template_mako( filename, **kwargs )
>
> File '/home/galaxy/galaxy-dev/lib/galaxy/web/framework/__init__.py', 
> line
> 847 in fill_template_mako
>
>   return template.render( **data )
>
> File 
> '/home/galaxy/galaxy-dev/eggs/Mako-0.4.1-py2.7.egg/mako/template.py',
> line 296 in render
>
>   return runtime._render(self, self.callable_, args, data)
>
> File 
> '/home/galaxy/galaxy-dev/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py',
> line 660 in _render
>
>   **_kwargs_for_callable(callable_, data))
>
> File 
> '/home/galaxy/galaxy-dev/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py',
> line 692 in _render_context
>
>   _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
>
> File 
> '/home/galaxy/galaxy-dev/eggs/Mako-0.4.1-py2.7.egg/mako/runtime.py',
> line 718 in _exec_template
>
>   callable_(context, *args, **kwargs)
>
> File 
> '/home/galaxy/galaxy-dev/database/compiled_templates/base.mako.py',
> line 42 in render_body
>
>   __M_writer(unicode(next.body()))
>
> File
> '/home/galaxy/galaxy-dev/database/compiled_templates/workflow/run.mako
> .py',
> line 171 in render_body
>
>   __M_writer(unicode(do_inputs( tool.inputs, step.state.inputs, 
> errors.get( step.id, dict() ), "", step, None, used_accumulator )))
>
> File
> '/home/galaxy/galaxy-dev/database/compiled_templates/workflow/run.mako
> .py',
> line 40 in do_inputs
>
>   return
> render_do_inputs(context.locals_(__M_locals),inputs,values,errors,pref
> ix,step,other_values,already_used)
>
> File
> '/home/galaxy/galaxy-dev/database/compiled_templates/workflow/run.mako
> .py',
> line 435 in render_do_inputs
>
>   __M_writer(unicode(row_for_param( input, values[ input.name ], 
> other_values, errors, prefix, step, already_used )))
>
> File
> '/home/galaxy/galaxy-dev/database/compiled_templates/workflow/run.mako
> .py',
> line 338 in row_for_param
>
>   return
> render_row_for_param(context,param,value,other_values,error_dict,prefi
> x,step,already_used)
>
> File
> '/home/galaxy/galaxy-dev/database/compiled_templates/workflow/run.mako
> .py',
> line 498 in render_row_for_param
>
>   __M_writer(unicode(conn.output_name))
>
> AttributeError: 'list' object has no attribute 'output_name'
>
>
>
>
>
> ________________________________________
> THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR 
> ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS 
> PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE.
> If the reader of this E-mail message is not the intended recipient, 
> you are hereby notified that any dissemination, distribution or 
> copying of this communication is strictly prohibited. If you have 
> received this communication in error, please notify us immediately at 
> abl...@ablynx.com.
> Thank you for your co-operation.
> "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V.
> ________________________________________
>
> ___________________________________________________________
> 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/
________________________________________
THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO 
WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, 
CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. 
If the reader of this E-mail message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately at abl...@ablynx.com. Thank you for your 
co-operation. 
"NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. 
________________________________________


___________________________________________________________
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/

Reply via email to