I'm working on a small script in python, which, among other things, opens and manipulates Excel files. Upon testing the script, I noticed that if I edit a file in Planmaker, then I can't open it with openpyxl (I haven't tried other python modules).
The error displayed is the following:
Code: Select all
Traceback (most recent call last):
File "/home/mochobb/projects/cmvfat/tests/cmvfat.py", line 82, in <module>
wbEDOC=load_workbook(str(fEDOC[int(iEDOC)]), read_only=False, data_only=False)
File "/usr/lib/python3.10/site-packages/openpyxl/reader/excel.py", line 346, in load_workbook
reader.read()
File "/usr/lib/python3.10/site-packages/openpyxl/reader/excel.py", line 299, in read
apply_stylesheet(self.archive, self.wb)
File "/usr/lib/python3.10/site-packages/openpyxl/styles/stylesheet.py", line 198, in apply_stylesheet
stylesheet = Stylesheet.from_tree(node)
File "/usr/lib/python3.10/site-packages/openpyxl/styles/stylesheet.py", line 103, in from_tree
return super(Stylesheet, cls).from_tree(node)
File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/serialisable.py", line 83, in from_tree
obj = desc.from_tree(el)
File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/sequence.py", line 94, in from_tree
return [self.expected_type.from_tree(el) for el in node]
File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/sequence.py", line 94, in <listcomp>
return [self.expected_type.from_tree(el) for el in node]
File "/usr/lib/python3.10/site-packages/openpyxl/styles/fills.py", line 64, in from_tree
return PatternFill._from_tree(child)
File "/usr/lib/python3.10/site-packages/openpyxl/styles/fills.py", line 102, in _from_tree
return cls(**attrib)
TypeError: PatternFill.__init__() got an unexpected keyword argument 'extLst'
The error posted above already contains the line of code where it fails on the 2nd line (I only try to open the file). The code works normally if the two files are edited with MS Excel, so the problem isn't there.
I am aware this can be a problem on openpyxl side, but I thought reporting this problem here and making the files available could lead the Softmaker team to find some minor flaw which needs to be corrected.
Thank you very much,