openpyxl >=2.4 throws use_iterators keyword argument unexpected
See original GitHub issueHi folks,
I am using petl 1.1.1 with openpyxl >=2.4. When executing
rows = petl.io.xlsx.fromxlsx('excel.xlsx', sheet='Sheet1')
print(rows)
I receive
Traceback (most recent call last):
File "[...]\test.py", line 9, in <module>
print(rows)
File "[...]\lib\site-packages\petl\util\vis.py", line 169, in _table_str
return str(lookstr(table))
File "[...]\lib\site-packages\petl\util\vis.py", line 104, in __repr__
table, overflow = _vis_overflow(self.table, self.limit)
File "[...]\lib\site-packages\petl\util\vis.py", line 528, in _vis_overflow
table = list(islice(table, 0, limit+2))
File "[...]\lib\site-packages\petl\io\xlsx.py", line 51, in __iter__
use_iterators=True, **self.kwargs)
TypeError: load_workbook() got an unexpected keyword argument 'use_iterators'
A quick search via the gogler reveals, that the use_iterators
keyword argument was removed as of 2.4 of openpyxl.
Workaround: use openpyxl <2.4 (e.g. 2.3.2)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
openpyxl: Gives error on load_workbook() - Stack Overflow
TypeError: load_workbook() got an unexpected keyword argument 'use_iterators'. A pip freeze command shows that I was using openpyxl 2.3.5 ...
Read more >Error opening xlsx, __init__() got an unexpected keyword ...
Created originally on Bitbucket by devdesu (Anna Coleman) Strange error on load_workbook(), win 10 x64, python 3.7, openpyxl==2.5.8:
Read more >openpyxl.reader.excel module - Read the Docs
openpyxl.reader.excel module¶. Read an xlsx file into Python. class openpyxl.reader.excel. ExcelReader (fn, read_only=False, keep_vba=False, data_only=False ...
Read more >Am I using the right version of openpyxl? - Google Groups
TypeError: __init__() got an unexpected keyword argument 'hashValue' ... Bitbucket has default, 2,3 and 2.4 branches. ReadTheDocs has 2.2.6 as the most ...
Read more >iter_rows() got an unexpected keyword argument 'row_offset ...
To resolve this error, change version of openpyxl python -m pip install openpyxl==2.5 ERROR MESSAGE Traceback (most recent call last): File ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @alimanfoo any plans on promoting the fix to a new version into pip repository?
I am getting the same error but for a different cause: I am using docker and I am not able to put ‘git+’ on my pip requirements file, because then I will have to completely modify my image.
Since this is overdue since May, I hope that my message gives you motivation enough to push this fix to mainstream! 😉
Take care.
I was able to find it on the internet! Thanks
pip install git+https://github.com/alimanfoo/petl.git