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:
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>
File "F:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
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'.