Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi everyone,
So for the longest time, I was experiencing this issue with PBI where my Python scripts just wouldn't run, despite the PATH in "Python Script Options" being correct.
The errors I'd get would be something along the lines of:
ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 4, in <module>
import matplotlib.pyplot
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\colorbar.py", line 32, in <module>
import matplotlib.contour as contour
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\contour.py", line 18, in <module>
import matplotlib.font_manager as font_manager
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\font_manager.py", line 48, in <module>
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified module could not be found.
The above error seems pretty explanatory - except I had all of the modules needed.
At the advice of @pkoetzing here (https://community.powerbi.com/t5/Desktop/Error-when-connecting-python-to-PBI/m-p/854965/highlight/tr...), I tried opening PBI from the Anaconda Prompt, and somehow it works! I'm baffled as to why this is, but opening PBI on its own doesn't let my Python scripts run. The settings in both cases are always the same.
Any advice would be appreciated! Ideally I want to set up a gateway here where the data that goes through Python scripts actually work without the PBI having been launched specifically from Anaconda Prompt. Thanks for any help!
Hi @rainynights ,
From the article, we know when preparing and running a Python script in Power BI Desktop, there are a few limitations:
You may upgrade the Power BI Desktop to the latest version 2.75.5649.861 , and try it again.
If you still have this issue for Power BI, you'd better create a support ticket in Power BI Support , Scroll down and click "CREATE SUPPORT TICKET", to get further help.
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |