RuntimeError: The Product License has not been initialized.

139
0
2 weeks ago
jasminearora
New Contributor

Getting the below error while running the python script via Azure Devops pipeline as not getting while running manually. 

Using arcgis pro with concurrent use license

using arcpy to update connection properties within an ArcGIS project file (*.aprx). This script is updating the connection properties for a Geodatabase connection within the project and then saving a copy of the updated project file.

Python Script:

import arcpy
aprx = arcpy.mp.ArcGISProject(r'\\.../../../C.aprx')
aprx.updateConnectionProperties(r'\\ESRI@g.sde', r'\\ESRI@g1.sde')
aprx.saveACopy(r"\\B.aprx")

 



Error Encountered:

import arcpy
File "F:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 77, in <module>
from arcpy.geoprocessing import gp
File "F:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "F:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "F:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\__init__.py", line 131, in <module>
from ._arcgisscripting import *
RuntimeError: The Product License has not been initialized.
##[error]Cmd.exe exited with code '1'.



0 Kudos
0 Replies