Fix error in reports macro file#1604
Merged
mvdbeek merged 1 commit intogalaxyproject:masterfrom Feb 2, 2026
Merged
Conversation
mvdbeek
approved these changes
Jan 30, 2026
Member
|
new black at work here ... let me open a separate PR to fix this |
when testing against public instances I got
```
Traceback (most recent call last):
File "/tmp/venv/bin/planemo", line 7, in <module>
sys.exit(planemo())
^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 1485, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 1873, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/decorators.py", line 93, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/click/core.py", line 824, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/cli.py", line 146, in handle_blended_options
return f(*args, **kwds)
^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/commands/cmd_test.py", line 76, in cli
return_value = test_runnables(ctx, runnables, original_paths=uris, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/engine/test.py", line 15, in test_runnables
return handle_reports_and_summary(ctx, test_data.structured_data, kwds=kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/galaxy/test/actions.py", line 53, in handle_reports_and_summary
handle_reports(ctx, structured_data, kwds)
File "/tmp/venv/lib/python3.12/site-packages/planemo/galaxy/test/actions.py", line 90, in handle_reports
raise exceptions[0]
File "/tmp/venv/lib/python3.12/site-packages/planemo/galaxy/test/actions.py", line 85, in handle_reports
_handle_test_output_file(ctx, report_type, structured_data, kwds)
File "/tmp/venv/lib/python3.12/site-packages/planemo/galaxy/test/actions.py", line 111, in _handle_test_output_file
contents = build_report.build_report(test_data, report_type=report_type, execution_type=execution_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/reports/build_report.py", line 68, in build_report
markdown = template_data(environment, "report_markdown.tpl")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/reports/build_report.py", line 95, in template_data
return template.render(**environment)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
File "/tmp/venv/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/tmp/venv/lib/python3.12/site-packages/planemo/reports/report_markdown.tpl", line 81, in top-level template code
{{render_steps(test.data.invocation_details.steps.values(), display_job_attributes)}}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/jinja2/runtime.py", line 784, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/reports/macros.tmpl", line 13, in template
{{ render_step_jobs(step_data, display_job_attributes) }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/jinja2/runtime.py", line 784, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/venv/lib/python3.12/site-packages/planemo/reports/macros.tmpl", line 32, in template
{% for metric in job.get('job_metrics', []) %}
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
```
d1f2d28 to
225dcbc
Compare
Collaborator
Author
|
Good to go? Error seems to be a different one than in #1605 - but same file. |
Collaborator
Author
|
Thanks @mvdbeek should I create a new release? Or is there anything else you want to get in? |
Member
|
Sure, go ahead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when testing against public instances I got