New Vagrant builds fail with the following error because the save_virtual_workbook function was removed from openpyxl and we don't have that dependency pinned to a hard version:
ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel' (/home/vagrant/lw/lib/python3.9/site-packages/openpyxl/writer/excel.py)
This can easily be fixed temporarily by hard-pinning the openpyxl dependency to version 3.0.10 (the last version where the save_virtual_workbook function existed) in requirements.txt, however, it would be more prudent to set it as openpyxl>=3.1.0,<3.2.0 and fix our code using NamedTemporaryFile as mentioned in the code where this was deprecated.
Problem
New Vagrant builds fail with the following error because the
save_virtual_workbook
function was removed fromopenpyxl
and we don't have that dependency pinned to a hard version:Steps to reproduce
Run:
vagrant destroy
andvagrant up
.Related materials
Related information
Related code
staff/management/commands/list_staff_wagtail.py
staff/wagtail_hooks.py
units/management/commands/list_units_wagtail.py
units/views.py
Other information:
This can easily be fixed temporarily by hard-pinning the
openpyxl
dependency to version3.0.10
(the last version where thesave_virtual_workbook
function existed) inrequirements.txt
, however, it would be more prudent to set it asopenpyxl>=3.1.0,<3.2.0
and fix our code usingNamedTemporaryFile
as mentioned in the code where this was deprecated.