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
merged 1 commit into from Apr 1, 2016

Conversation

@mvdbeek
Copy link
Member

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 https://github.com/galaxyproject/galaxy/blob/release_16.01/lib/galaxy/tools/evaluation.py#L211

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.
@jmchilton

This comment has been minimized.

Copy link
Member

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.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished.
Details
toolshed test Build finished.
Details
@mvdbeek

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/__init__.py", line 166, in prepare_job
    job_wrapper.prepare()
  File "/opt/galaxy/lib/galaxy/jobs/__init__.py", line 885, in prepare
    tool_evaluator.set_compute_environment( compute_environment, get_special=get_special )
  File "/opt/galaxy/lib/galaxy/tools/evaluation.py", line 107, in set_compute_environment
    self.tool.exec_before_job( self.app, inp_data, out_data, param_dict )
  File "/opt/galaxy/lib/galaxy/tools/__init__.py", line 1956, in exec_before_job
    out.write( json.dumps( (json_params) ).encode('utf8') )
  File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", 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
Projects
None yet
3 participants
You can’t perform that action at this time.