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

[19.09] Fix 'NoneType' object has no attribute 'get_tool_relative_path' with data_manager_manual #8792

Closed
wants to merge 2 commits into from

Conversation

abretaud
Copy link
Contributor

While running biomaj2galaxy tests with Galaxy 19.05 I get this error when trying to populate a data table with the manual data manager:

Traceback (most recent call last):
  File "lib/galaxy/jobs/runners/__init__.py", line 224, in prepare_job
    job_wrapper.prepare()
  File "lib/galaxy/jobs/__init__.py", line 863, in prepare
    tool_evaluator.set_compute_environment(compute_environment, get_special=get_special)
  File "lib/galaxy/tools/evaluation.py", line 118, in set_compute_environment
    out_data=out_data, tool=self.tool, param_dict=incoming)
  File "lib/galaxy/tools/__init__.py", line 1719, in call_hook
    return code(*args, **kwargs)
  File "../shed_tools/toolshed.g2.bx.psu.edu/repos/iuc/data_manager_manual/6524e573d9c2/data_manager_manual/data_manager/data_manager_manual.py", line 57, in exec_before_job
    target_dir, tool_path, relative_target_dir = tdtm.get_target_install_dir( tool_shed_repository )
  File "lib/tool_shed/tools/data_table_manager.py", line 111, in get_target_install_dir
    tool_path, relative_target_dir = tool_shed_repository.get_tool_relative_path(self.app)
AttributeError: Error in 'Manual Data Manager' hook 'exec_before_job', original message: 'NoneType' object has no attribute 'get_tool_relative_path'

I guess the bug was introduced in #7316, a tool_shed_repository object was no longer accessible from the data manager code.

I tested the patch with 19.05, but it should work the same with 19.09 (too late to test this week :) )

It would be cool to have it backported to 19.05 too (I have a branch ready for that if needed https://github.com/galaxyproject/galaxy/compare/release_19.05...abretaud:dmfix1905?expand=1)

(There's another PR in IUC to fix another problem in the data manager galaxyproject/tools-iuc#2634)

@martenson martenson added this to the 19.09 milestone Oct 11, 2019
@mvdbeek mvdbeek self-assigned this Oct 15, 2019
mvdbeek
mvdbeek previously approved these changes Oct 15, 2019
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good fix, though I noticed that data managers in repos without install database will fail since they don't have get_tool_relative_path. We should be able to fix that too, I'll take a look.

mvdbeek referenced this pull request in galaxyproject/tools-iuc Oct 15, 2019
Small cleanups.
@mvdbeek mvdbeek dismissed their stale review October 16, 2019 12:43

tool_shed_repository may be referenced before assignment

@abretaud
Copy link
Contributor Author

Thanks for merging! Is it possible to have it backported to 19.05? It would repair biomaj2galaxy for people running 19.05 (including me ;))

@mvdbeek
Copy link
Member

mvdbeek commented Oct 17, 2019

I'm working on it, I don't think this works as is.

@abretaud
Copy link
Contributor Author

Arf, ok thanks!

@martenson
Copy link
Member

superseded by #8817

thanks @abretaud !

@martenson martenson closed this Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants