TypeError: __init__() got an unexpected keyword argument 'and'
Created originally on Bitbucket by markcharney (Mark Charney)
I just tried openpyxl to see if would work with my large (2MB) xlsxf file and it failed as follows. I cannot supply the xlsx file as it contains sensitive data for my job.
#!shell
% pip install openpyxl
Collecting openpyxl
Downloading openpyxl-2.4.5.tar.gz (180kB)
100% |################################| 184kB 779kB/s
Collecting jdcal (from openpyxl)
Downloading jdcal-1.3.tar.gz
Collecting et_xmlfile (from openpyxl)
Downloading et_xmlfile-1.0.1.tar.gz
Installing collected packages: jdcal, et-xmlfile, openpyxl
Running setup.py install for jdcal ... done
Running setup.py install for et-xmlfile ... done
Running setup.py install for openpyxl ... done
Successfully installed et-xmlfile-1.0.1 jdcal-1.3 openpyxl-2.4.5
% python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import openpyxl
>>> wb = openpyxl.load_workbook('vm-sharing/test.xlsx')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/reader/excel.py", line 238, in load_workbook
ws_parser.parse()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/reader/worksheet.py", line 129, in parse
obj = prop[1].from_tree(element)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 76, in from_tree
obj = desc.expected_type.from_tree(el)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 76, in from_tree
obj = desc.expected_type.from_tree(el)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openpyxl/descriptors/serialisable.py", line 89, in from_tree
return cls(**attrib)
TypeError: __init__() got an unexpected keyword argument 'and'
>>>