Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
ramlalr
New Member

Issue while extracting files from a zip file placed in files section of lakehouse

I have placed a zip file in a RAW subfolder under files folder in lakehouse, when I try to unzip using zipfile package getting  "FileNotFoundError: [Errno 2] No such file or directory: '/RAW/data_Q2_2017.zip'"

 

Code Used:

import zipfile
with zipfile.ZipFile("/RAW/data_Q2_2017.zip", 'r') as zip_ref:
    zip_ref.extractall()
1 ACCEPTED SOLUTION
v-cboorla-msft
Microsoft Employee
Microsoft Employee

Hi @ramlalr 

 

Thanks for using Microsoft Fabric Community.

The error message you are seeing, “FileNotFoundError: [Errno 2] No such file or directory: ‘/RAW/data_Q2_2017.zip’”, typically means that Python cannot find the file you’re trying to unzip. In your case, you are trying to unzip the file located at “/RAW/data_Q2_2017.zip”. This path is an absolute path, which means Python is looking for the file starting from the root directory (“/”). If your file is located in a subdirectory of your current working directory, you should use a relative path instead of an absolute path. A relative path starts from your current working directory, not from the root directory.

vcboorlamsft_0-1718359386014.png

 

I hope this information helps. Please do let us know if you have any further queries.

 

Thank you.

View solution in original post

3 REPLIES 3
ramlalr
New Member

Thanks for the help

Hi @ramlalr 

 

Glad that your query got resolved.
Please continue using Fabric Community for further queries.

 

Thank you.

v-cboorla-msft
Microsoft Employee
Microsoft Employee

Hi @ramlalr 

 

Thanks for using Microsoft Fabric Community.

The error message you are seeing, “FileNotFoundError: [Errno 2] No such file or directory: ‘/RAW/data_Q2_2017.zip’”, typically means that Python cannot find the file you’re trying to unzip. In your case, you are trying to unzip the file located at “/RAW/data_Q2_2017.zip”. This path is an absolute path, which means Python is looking for the file starting from the root directory (“/”). If your file is located in a subdirectory of your current working directory, you should use a relative path instead of an absolute path. A relative path starts from your current working directory, not from the root directory.

vcboorlamsft_0-1718359386014.png

 

I hope this information helps. Please do let us know if you have any further queries.

 

Thank you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.