html exporter crashes without results from classic tests

Bug #1456155 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Converged
Fix Released
High
Unassigned
PlainBox (Toolkit)
Fix Released
High
Zygmunt Krynicki

Bug Description

Run checkbox-touch, run a non-classic test plan, execute (or skip) everything then save the results at the end. Observe the following crash:

INFO:plainbox.session.state:Wynik zadania <JobDefinition id:'2013.com.canonical.certification::smoke/manual' plugin:'manual'> zmieniony na <MemoryJobResult execution_duration:118.24326682090759 outcome:'fail'>
ERROR:checkbox.touch:export_results(...) raised UndefinedError('list object has no element 0',)
Traceback (most recent call last):
  File "/home/zyga/checkbox/checkbox-touch/py/checkbox_touch.py", line 173, in wrapper
    result = func(*args, **kwargs)
  File "/home/zyga/checkbox/checkbox-touch/py/checkbox_touch.py", line 702, in export_results
    self._export_session_to_stream(output_format, option_list, stream)
  File "/home/zyga/checkbox/checkbox-touch/py/checkbox_touch.py", line 746, in _export_session_to_stream
    exporter.dump_from_session_manager(self.manager, stream)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/exporter/html.py", line 83, in dump_from_session_manager
    self.dump(data, stream)
  File "/home/zyga/checkbox/plainbox/plainbox/impl/exporter/jinja2.py", line 77, in dump
    self.template.stream(data).dump(stream, encoding='utf-8')
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1142, in dump
    fp.writelines(iterable)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1138, in <genexpr>
    iterable = (x.encode(encoding, errors) for x in self)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1186, in __next__
    return self._next()
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 993, in generate
    yield self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 36, in reraise
    raise value.with_traceback(tb)
  File "/home/zyga/checkbox/plainbox/plainbox/data/report/checkbox.html", line 25, in <module>
    <p>{{ manager.state.resource_map["2013.com.canonical.certification::lsb"][0]["description"] }}</p>
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 378, in getitem
    return obj[argument]
jinja2.exceptions.UndefinedError: list object has no element 0
ERROR:checkbox.touch.qml:Unable to export test results
Stacktrace:
#0 @file:///home/zyga/checkbox/checkbox-touch/components/PythonLogger.qml:85
#1 @file:///home/zyga/checkbox/checkbox-touch/components/CheckboxTouchApplication.qml:148
#2 @file:///home/zyga/checkbox/checkbox-touch/components/CheckboxTouchApplication.qml:164
#3 @file:///home/zyga/checkbox/checkbox-touch/components/PythonObjectHandle.qml:69

Zygmunt Krynicki (zyga)
summary: - html exporter crashes
+ html exporter crashes without results from classic tests
Changed in checkbox-touch:
importance: Undecided → High
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This will be addressed with my recent work on html

Changed in plainbox:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Zygmunt Krynicki (zyga)
Zygmunt Krynicki (zyga)
Changed in plainbox:
status: In Progress → Fix Committed
Changed in plainbox:
milestone: none → 0.22
Changed in checkbox-touch:
milestone: none → 1.3
Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: [Bug 1456155] Re: html exporter crashes without results from classic tests

Is this still true, I think we've fixed it now.

On Fri, Jun 26, 2015 at 3:40 PM, Sylvain Pineau
<email address hidden> wrote:
> ** Changed in: plainbox
> Milestone: None => 0.22
>
> ** Changed in: checkbox-touch
> Milestone: None => 1.3
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1456155
>
> Title:
> html exporter crashes without results from classic tests
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/checkbox-touch/+bug/1456155/+subscriptions

Changed in plainbox:
status: Fix Committed → Fix Released
Changed in checkbox-touch:
status: New → Fix Released
milestone: 1.3 → 1.2.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.