cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KatiaWilliams Frequent Visitor
Frequent Visitor

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
Community Support Team
Community Support Team

Re: Python Permission Denied Error 13

HI @KatiaWilliams ,

>>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

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
KatiaWilliams Frequent Visitor
Frequent Visitor

Re: Python Permission Denied Error 13

Hi @v-shex-msft ,

 

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.

Community Support Team
Community Support Team

Re: Python Permission Denied Error 13

HI @KatiaWilliams ,

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

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors