I have a script that edits an xlsx file I've been running weekly successfully for a year and a half, up until last week when this error started to occur: Excel file format cannot be determined, you must specify an engine manually.
df = pd.read_excel("test.xlsx", keep_default_na=False, sheet_name=sheet_name)
is the line causing an issue. I have xlrd
version 1.2.0 installed, since xlsx support was removed later. I've tried using different directories too, to no avail.
edit: specifying the engine as "xlrd" gives me the error:
expected str, bytes or os.PathLike object, not NoneType
specifying engin as "openpyxl" gives the error:
File is not a zip file
None of this even works when I used a .xls
file either
edit2: Okay so I created a blank spreadsheet and it's not throwing that error anymore (Just an error due to the fact that it's blank obv). What could cause this?