When running scripts that import arcpy, i receive:
File ".\Arcpy\PublishService.py", line 9, in <module>
import arcpy
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 88, 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 128, in <module>
from ._arcgisscripting import *
RuntimeError: **The Product License has not been initialized**.
the characteristics of my environment:
ArcGIS pro 2.9.3
ArcGIS Pro Named User License
The processes were running with out issue, but since yesterday it start with this issue, as it can be seen in the code above, the error is triggered when the script reach the import arcpy command.
An special consideration: I have a set of 5-6 scripts that runs over 4 geodatabases, all of them are orchestrated to be run sequentially by a service (the service runs under the same credentials as the ArcGIS Pro application was configured and executed - you know...the profile cookie), but not all the scripts fail, and the failing ones are not always the same.
I even have a script made in PowerShell that uses the ArcGIS.Core.Hosting.dll, it is failing too when the initialization is called.