Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am trying to run a python script on some data I keep getting this error even If I run nothing like I just run it still gives me this code
DataSource.Error: ADO.NET: A problem occurred while processing your Python script.
Here are the technical details: Access is denied
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=A problem occurred while processing your Python script.
Here are the technical details: Access is denied
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonUnexpectedException
With above steps i was able to overcome the acess denied error.
Hi,
Does your script works when run outside of Power BI? Also do you have credentials and permissions set up in "data source settings"?
Proud to be a Super User!
My script runs fine in VS code for the permissions can you guide to check it I could not find Data Source section
UPDATE: I am using the App on Windows 10 and privacy set to none
Here is a good discussion about this in stackoverflow: import - "Access is denied" error while importing CSV to Power BI via Python - Stack Overflow
Basically check these things:
1. Can you access the data source on its own. Also try setting the privacy level to public.
2. Does the Python work outside PBI (you said this is okay)
3. Is the Python installed correctly from PBI's persoective
Proud to be a Super User!
1. Can you access the data source on its own. Also try setting the privacy level to public.
Done
2. Does the Python work outside PBI (you said this is okay)
Yes
3. Is the Python installed correctly from PBI's persoective
yes and it is set in the settings for the location of the python installtion
Hi,
Since the issue persists even with those answers I think the problem is the python location. Going back to the stackoverflow discussion I recommend checking your path settings:
"
If none of that works, and you are using Anaconda the hardest solution is to launch the PowerBI Desktop executable from the Anaconda Prompt after activating the environment in which you want to run the Python script. The command to use to launch Power BI Desktop is as follows:
C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe
At that point PowerBI Desktop opens and, repeating the steps from before to run the sample Python code, you should be ok.
NOTE: Please ensure you add Anaconda to System Environment Variable Path list:
C:\ProgramData\Anaconda3 C:\ProgramData\Anaconda3\Scripts C:\ProgramData\Anaconda3\Library\bin
Proud to be a Super User!
My Python Installation was (is) under
You may have to change the locaton inside PowerBI to
C:\Users\YOUR_USER_NAME\AppData\Local\Microsoft\WindowsApps\python
Hope this helps..
kind regards, Enno
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
106 | |
46 | |
22 | |
22 | |
21 |