Skip to content

Benchcomp fails to render scatterplot when some data values are empty #3210

Closed
@karkhaz

Description

@karkhaz

Here is an example crash.

When some of the results are empty, the following exception gets raised when rendering scatterplots.

 Traceback (most recent call last):
  File "new/tools/benchcomp/bin/benchcomp", line 31, in <module>
    main()
  File "new/tools/benchcomp/bin/benchcomp", line 27, in main
    args.func(args)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/entry/visualize.py", line 19, in main
    generate_visualizations(results)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/visualizers/utils.py", line 122, in __call__
    visualize(results)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/visualizers/__init__.py", line 415, in __call__
    output = template.render(d=data, scatterplot=include_scatterplot)[:-1]
  File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 18, in <module>
  File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 820, in do_round
    return round(value, precision)
TypeError: type Undefined doesn't define __round__ method

Metadata

Metadata

Assignees

Labels

[C] BugThis is a bug. Something isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions