reporting-engine icon indicating copy to clipboard operation
reporting-engine copied to clipboard

[18.0]report_xlsx - xlrd.biffh.XLRDError: Excel xlsx file; not supported

Open psugne opened this issue 11 months ago • 0 comments

I faced an error when running test_report test where if fails on:

2025-01-16 12:58:06,438 1 INFO odoodb odoo.addons.report_xlsx.tests.test_report: Starting TestReport.test_report ... 
2025-01-16 12:58:06,454 1 INFO odoodb odoo.addons.report_xlsx.tests.test_report: ====================================================================== 
2025-01-16 12:58:06,454 1 ERROR odoodb odoo.addons.report_xlsx.tests.test_report: ERROR: TestReport.test_report
Traceback (most recent call last):
  File "/opt/odoo/projects/reporting-engine/report_xlsx/tests/test_report.py", line 31, in test_report
    wb = open_workbook(file_contents=rep[0])
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/venv/lib/python3.12/site-packages/xlrd/__init__.py", line 170, in open_workbook
    raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

Module

report_xlsx

Describe the bug

An error is visible by using python3.12 with installed xlrd==2.0.1 version, where xlrd dropped support for reading .xlsx files from 2.0.0 version so that's why I'm getting this error.

To Reproduce

Affected versions: Tested on python3.12, Odoo 18.0

Steps to reproduce the behavior:

  1. Install Odoo 18.0 with python3.12
  2. Install report_xlsx module with it's dependencies (xlrd==2.0.1)
  3. Start running report_xlsx module's test_report test

Expected behavior No error when running report_xlsx module tests

psugne avatar Jan 16 '25 13:01 psugne