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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Python Permission Denied Error 13

I'm getting this error when I try to run some python code:

 

PermissionError: [Errno 13] Permission denied: 'FILEPATH/FILE.csv'

    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException

I know I have access to this file because I pulled it in a previous query, and a later query, successfully. 

 

Also, everytime I'm prompted for permissions, I accept.

 

Thanks in advance!

3 REPLIES 3
Anonymous
Not applicable

HI @Anonymous ,

>>I know I have access to this file because I pulled it in a previous query, and a later query, successfully. 

I think the permission is means execute python script permission. It will display permission alert every time you changed on the python script. (permission is matched with specific python code, you need to confirm operation permissions for executing new code)

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for the tip! However, I know that I always accept the script when it asks for permission.

 

I'll run the script once, it'll ask for permission, and I will give it. This works fine.

Then, I'll try to re-run all my queries. This time, it gives me this error. I did not change anything in the script.

 

This is why I'm confused.

Anonymous
Not applicable

HI @Anonymous ,

Any specific operations in your formula? Can you please share more detail information about these? 

How to Get Your Question Answered Quickly

BTW, current power bi does not support dynamic python code based on query parameters. (it will display permission notice every time your parameter changes)

Regards,

Xiaoxin Sheng

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI 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.