Skip to content

xlrd no longs supports xlsx files (for reading OLI RSR) #16

@eoplus

Description

@eoplus

Dear developers,

When running POLYMER on an OLI scene, I get an error thrown by xlrd indicating that Excel xlsx is not supported when trying to read the static auxiliary file with OLI RSR Ball_BA_RSR.v1.2.xlsx. Checking online it seems that xldr used to support xlsx but since version 2.0 it no longer supports it (xlrd documentation). The specific error message is provided at the end.

The simplest alternative seems to convert the xlsx to xls and point to that file.

Traceback (most recent call last): File "/home/alexandre/Software/polymer/polymer_cli.py", line 14, in <module> cli.main(sys.argv[1:]) ~~~~~~~~^^^^^^^^^^^^^^ File "/home/alexandre/Software/polymer/polymer/cli.py", line 32, in main run_atm_corr(Level1(args.input_file), ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ Level2(filename=args.output_file, fmt=args.fmt)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alexandre/Software/polymer/polymer/main.py", line 501, in run_atm_corr with level2 as l2, level1 as l1: ^^^^^^ File "/home/alexandre/Software/polymer/polymer/level1.py", line 108, in __enter__ self.level1 = L1(self.filename, **self.kwargs) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alexandre/Software/polymer/polymer/level1_landsat8.py", line 158, in __init__ self.init_spectral() ~~~~~~~~~~~~~~~~~~^^ File "/home/alexandre/Software/polymer/polymer/level1_landsat8.py", line 211, in init_spectral wb = xlrd.open_workbook(srf_file) File "/home/alexandre/miniconda3/envs/polymer/lib/python3.13/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions