0

i tried to load workbook from the exisitng file but it is showing zipfile error. this is the full error description i got

Traceback (most recent call last):
  File "/home/i2fpi/Documents/dht11/test1/code.py", line 9, in <module>
    wb = opxl.load_workbook( filename = '/home/i2fpi/Documents/dht11/test1/data.xlsx')
  File "/home/i2fpi/.local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
    reader = ExcelReader(filename, read_only, keep_vba,
  File "/home/i2fpi/.local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in __init__
    self.archive = _validate_archive(fn)
  File "/home/i2fpi/.local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 96, in _validate_archive
    archive = ZipFile(filename, 'r')
  File "/usr/lib/python3.9/zipfile.py", line 1257, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.9/zipfile.py", line 1324, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file``` 

>i am running code in an rpi
Abhi
  • 1
  • 1

0 Answers0