Error with HTML exporter when running Checkbox in a virtual environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Next Generation Checkbox (CLI) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Steps
=====
Install Checkbox using the mk-venv script:
git clone git+ssh://<email address hidden>/checkbox-ng
cd checkbox-ng
./mk-venv
Activate the venv and start checkbox:
source path/to/
(venv) $ checkbox-cli
Expected result
===============
Checkbox can run and export HTML report using the default Jinja2 exporter.
Actual result
=============
An error is displayed before the Test Plan selection screen:
-------
ERROR:plainbox.
-------
When a test run completes, the HTML report cannot be generated:
-------
ERROR:checkbox-
ERROR:checkbox-
ERROR:checkbox-
ERROR:checkbox-
-------
Investigation
=============
When running mk-venv, the latest versions of each required Python packages is installed. At time of writing, it means Jinja2 v3.1.2. However, in v3.1.0[1], Markup and escape were deprecated and moved to another Python package (markupsafe). See jinja2 src[2] for more info.
For now, Ubuntu repos are still using older versions of Jinja2[3].
Workaround
==========
Install Jinja2 and MarkupSafe with versions similar to the ones in the repos of a given Ubuntu version. For instance, to match the versions found in Ubuntu 20.04:
(venv) $ pip install jinja2==2.10.1
(venv) $ pip install markupsafe==1.1.0
[1] https:/
[2] https:/
[3] https:/
Bug was migrated to GitHub: https:/ /github. com/canonical/ checkbox/ issues/ 238.
Bug is no more monitored here.