I'm attempting to run an unattended Power Automate Desktop flow that calls a Python script that uses the ArcGIS Python API. The script works fine in attended mode, but when set to unattended it crashes on the line that connects to AGOL:
from arcgis.gis import GIS
gis = GIS(username='<username>',password='<password>')
No errors are produced, just crashes.
Any ideas?
Better way to do it is login to Pro then use this line instead and it grabs the credentials from Pro even if it is not open. Never want to hardcode a password. Plus it works for 2 factor, etc.
Unfortunately I do not have Pro on this machine.
You are going to need it. It will install all the python packages you need also.
I have all the packages I need. It works fine in this env when I'm signed in. Only crashes when I run it through an unattanded flow.
My guess is something is still missing in the packages that did not get over properly. I would try Pro and see if it fixes it if possible.
Installing Pro on this machine is not an option.
It is a VM if that makes any difference.
Work around would be to write the data to a local file with another process then read it with my script. Not ideal though.