Hi all,
Any help would be much appreciated...... Shane Buscher & Arne Gelfert
When attempting to run a python 3 script, that imports arcpy, from an asp.net service, I am receiving the following runtime error:
File "C:\UploadWindsCurrents.py", line 13, in <module>
import arcpy
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 74, in <module>
from arcpy.geoprocessing import gp
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\__init__.py", line 1, in <module>
from ._arcgisscripting import *
RuntimeError: Not signed into Portal.
The script runs fine when I run it through command prompt, either specifying the propy.bat or the python3 interpreter.
eg: "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" C:\UploadWindsCurrents.py scenario currentsdir windsdir
I understand that when running a python script in the 3.x when importing arcpy it verifies that the install of ArcGIS Pro is licensed.
Based on other articles I have tried the following with no success...
references:
ArcPy fails to import when not logged into host machine
Thanks
James
As a note, I have successfully run a 2.x python script from the asp.net service so the issue is definitely with python 3.x and obtaining a license.
I think you might have to actually run Pro once as the user that will run your script. I remember something like that I had to do recently.