Experiencing errors running workflows opening excel files in windows 10

Skip to first unread message

Alvaro Bravo

Nov 1, 2022, 7:44:55 PM11/1/22
to Luigi
Hi all!

Here's a weird error I've been experiencing.

While working with luigi on Windows 10, when running workflows in my local machine for debugging, I have experienced the following error a couple of times and wanted to check if someone else has experienced this behavior.

The error happens in tasks that use pandas.read_excel function with the default openpyxl engine for .xlsx files.

If I run the task by itself, no issues are encountered, and most of the time, running the task inside a small workflow with a couple of tasks will succeed. However, with more tasks the probability of having this error increases.

The raised exception itself is "zipfile.BadZipFile: Bad magic number for central directory" from pandas-openpyxl-zipfile

I haven't been able to completely identify the root of the issue, but it appears to happen when the file is read in different points within the same task as the code extracts specific sheets according to the step and requirements.

This error hasn't shown up when the code is run in Linux, and I have overcome the issue by running the workflow by sections, but it would be nice to be able to have a fix in my local computer.

Reply all
Reply to author
0 new messages