pbpython icon indicating copy to clipboard operation
pbpython copied to clipboard

AttributeError: 'Book' object has no attribute 'extract_formulas'

Open FabZ90 opened this issue 7 years ago • 2 comments

Using: Pycharm 2018.2.4 Python 3.6

Just want to copy and run the code, but this is what I get:

Traceback (most recent call last): File "C:/Users/Fabian/PycharmProjects/Thesis/stacked_bar_app.py", line 8, in "https://github.com/chris1610/pbpython/blob/master/data/salesfunnel.xlsx?raw=True" File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\util_decorators.py", line 118, in wrapper return func(*args, **kwargs) File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel.py", line 230, in read_excel io = ExcelFile(io, engine=engine) File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\excel.py", line 292, in init self.book = xlrd.open_workbook(file_contents=data) File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd_init_.py", line 141, in open_workbook ragged_rows=ragged_rows, File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd\xlsx.py", line 808, in open_workbook_2007_xml x12book.process_stream(zflo, 'Workbook') File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd\xlsx.py", line 265, in process_stream meth(self, elem) File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd\xlsx.py", line 392, in do_sheet sheet = Sheet(bk, position=None, name=name, number=sheetx) File "C:\Users\Fabian\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xlrd\sheet.py", line 326, in init self.extract_formulas = book.extract_formulas AttributeError: 'Book' object has no attribute 'extract_formulas'

Does anyone can help? Thanks!

FabZ90 avatar Sep 26 '18 08:09 FabZ90

yes >.. Screenshot 2021-08-23 222305

Danish414 avatar Aug 23 '21 17:08 Danish414

The error is within xlrd. I would recommend updating the version of xlrd or installing openpyxl. That should fix the issue.

chris1610 avatar Aug 24 '21 01:08 chris1610