Hi,
Currently, I am working on a demo of my python script project and in a middle of trouble, the power automate desktop cannot run my script in powershell completely. I had checked my script in Windows Powershell and Windows Powershell ISE again, it ran correctly. While I am trying to use my script into PA the script error is:
Thank you in advance!
Traceback (most recent call last):
File "C:\Users\USER\Desktop\Program\bkf\plot.py", line 34, in plot
plt.savefig('plot_2.png')
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\pyplot.py", line 966, in savefig
res = fig.savefig(*args, **kwargs)
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\figure.py", line 3015, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\backend_bases.py", line 2255, in print_figure
result = print_method(
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\backend_bases.py", line 1669, in wrapper
return func(*args, **kwargs)
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\backends\backend_agg.py", line 509, in print_png
mpl.image.imsave(
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\matplotlib\image.py", line 1616, in imsave
image.save(fname, **pil_kwargs)
File "C:\Users\USER\.virtualenvs\bkf-LeCHbn9v\lib\site-packages\PIL\Image.py", line 2237, in save
fp = builtins.open(filename, "w+b")
PermissionError: [Errno 13] Permission denied: 'plot_2.png'
Hi @Chinnapan,
Do you want to run the python script in Power Apps?
Could you please tell me that if you import it from a PCF?
If you use a PCF to run the python script within Power Apps, I am afraid it is a huge work load for you.
To achieve your need, I think you could check the following steps.
Here is an video you could check for details:
Sanjiv Venkatram on LinkedIn: #aseansmsbizappsug #aseansmswomenintech #powerapps | 18 comments
stampcoin
91
Michael E. Gernaey
70
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1