Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better element_identifier handling in repeat sections #2029

merged 1 commit into from Apr 1, 2016


Copy link

mvdbeek commented Mar 29, 2016

The element_identifier key in param_dict includes the repeat name and number,
e.g. for a repeat called rep and an input called input this would be rep_0_input|__identifier__, but the repeat prefix (rep_0_) is not preserved, so looking up the element_identifier fails in

To avoid this, I'm creating a dictionary that maps input to element_identifier key so that element_identifiers for datasets in repeats are passed correctly to the tool wrapper.

…, so that element_identifiers for datasets in repeats

are passed correctly to the tool wrapper.

This comment has been minimized.

Copy link

jmchilton commented Apr 1, 2016

Awesome fix - thanks a bunch @mvdbeek! I removed the minor tag since it only applies to features/bugs introduced this release cycle - I think this is a serious bug and was introduced with this feature a long time ago. Thanks again!

@jmchilton jmchilton merged commit 569b87d into galaxyproject:dev Apr 1, 2016
4 checks passed
4 checks passed
api test Build finished.
continuous-integration/travis-ci/pr The Travis CI build passed
framework test Build finished.
toolshed test Build finished.

This comment has been minimized.

Copy link
Member Author

mvdbeek commented Apr 1, 2016

@jmchilton thanks for merging, and the explanation!

@mvdbeek mvdbeek deleted the mvdbeek:element_identifier_in_repeat branch Apr 8, 2016
nsoranzo added a commit to nsoranzo/galaxy that referenced this pull request May 11, 2016
When running a data manager with a dataset parameter, the job fails
with the following backtrace:

Traceback (most recent call last):
  File "/opt/galaxy/lib/galaxy/jobs/runners/", line 166, in prepare_job
  File "/opt/galaxy/lib/galaxy/jobs/", line 885, in prepare
    tool_evaluator.set_compute_environment( compute_environment, get_special=get_special )
  File "/opt/galaxy/lib/galaxy/tools/", line 107, in set_compute_environment
    self.tool.exec_before_job(, inp_data, out_data, param_dict )
  File "/opt/galaxy/lib/galaxy/tools/", line 1956, in exec_before_job
    out.write( json.dumps( (json_params) ).encode('utf8') )
  File "/usr/lib/python2.7/json/", line 243, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/", line 270, in iterencode
    return _iterencode(o, 0)
TypeError: keys must be a string

The bug was introduced in PR galaxyproject#2029.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.