ArcPy RuntimeError: The software is not authorized for use.

1763
10
Jump to solution
04-14-2025 12:04 PM
AnibalMmartinez
Frequent Contributor

Hola en un equipo tenemos ARCGIS SERVER 11.1 ,  en un momento para hacer una prueba se instalo ARCGIS PRO, y luego de la misma se desinstalado, luego de esto los scripts python no encuentran la licencia de arcgis SERVER.

Script de ejemplo

import arcpy
import os
import time
import sys
from pathlib import Path
import logging

 


def main():
try:
logging.info("Proceso iniciado...")
logging.info("Aguarde que soy lento por favor...")

if len(sys.argv) >= 1:

msj = sys.argv[0] #el argumento 0 no se usa, trae el nombre del script
usuario = sys.argv[1]
conexion_sde = sys.argv[2]
vista = sys.argv[3]
pathErr = sys.argv[4]
FC=usuario + "." + vista
TBErr=pathErr + r"\ErroresEncontrados.csv"

workspace = conexion_sde
arcpy.env.workspace = workspace

logging.info("Inicio")
arcpy.management.CheckGeometry(in_features=str(FC), out_table=TBErr,validation_method="OGC")
logging.info("Fin")

else:
msj = "Error al indicar los argumentos"
logging.error(msj + "\n")
msj = 'Ejemplo: D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe VIS_FC_OUTAGEAREA_EDIF_V.py "A001888" "D:\DBSDE-Usar VRed-SharedTools\SDE.sde"'
logging.error(msj + "\n")

time.sleep(5)

except Exception as e:
logging.error(e)


if __name__ == "__main__":
main()

 

Mensaje de Error: 

C:\Windows\system32>D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe D:\VRED\Scripts\chequearGeometry_FC.py "SDE" "D:\VRED\SharedTools\SDE.sde" "VIS_FC_CABLES_FTTH_DIST_V" "D:\VRED\Pasajes\Anibal"
Traceback (most recent call last):
File "D:\VRED\Scripts\chequearGeometry_FC.py", line 1, in <module>
import arcpy
File "D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\__init__.py", line 77, in <module>
from arcpy.geoprocessing import gp
File "D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "D:\Apps\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\__init__.py", line 131, in <module>
from ._arcgisscripting import *
RuntimeError: The software is not authorized for use.

C:\Windows\system32>pause
Press any key to continue . . .

 

0 Kudos
1 Solution

Accepted Solutions
AnibalMmartinez
Frequent Contributor

Lanzamos el planteo al proveedor local, y este nos contesto, que existe un issue planteado sin resolución previo, y nos recomendó ir por el workaround de pedir otro usuario o recrear el que teníamos. 

El área de seguridad nos proveyó un nuevo usuario y funciona.

Gracias a @EdwinRoa y @MichaelVolz por la ayuda.

View solution in original post

0 Kudos
10 Replies
MichaelVolz
Esteemed Contributor

What license level are you running arcpy against?

What type of licensing are you using, Named User, Concurrent Use, other 

0 Kudos
AnibalMmartinez
Frequent Contributor

hola, ¿como puedo verificar eso?, es el equipo servidor donde esta instalado ArcGis Server

Saludos,

Anibal

0 Kudos
EdwinRoa
Esri Contributor

Hola, Anibal

Puede verificar si dentro de las variables de entorno del S.O. hay alguna referencia que pueda estar usando el entorno de python de ArcGIS Server y que haya sido parte del entorno de ArcGIS Pro. Dentro de las variables a revisar (path, o alguna que se haya agregado y que se reconozca como parte de la instalación previa de ArcGIS Pro.)

Pregunta de chequeo: Aunque parezca obvia.  ¿Tras la desinstalación de ArcGIS Pro, se reinició el equipo donde está instalado ArcGIS Server?

 

 

0 Kudos
AnibalMmartinez
Frequent Contributor

Gracias Edwin, te confirmo que se reinicio el equipo.

Tema variables de entorno no veo nada distinto, tenemos 3 ambientes ARCGIS SERVER (desarrollo/testing/produccion) , te muestro las variables de entorno que veo relevantes o asociadas a ArcGIS o python, el ambiente donde falla es PRODUCCION. Y al final hago un comentario relevante sobre esto.

Desarroollo  Produccion 
VaribaleEntornoValor VaribaleEntornoValor
AGSDATASTORED:\Apps\ArcGis\DataStore\ AGSDATASTORED:\Apps\ArcGis\DataStore\
AGSPORTALD:\Apps\ArcGis\Portal\ AGSPORTALD:\Apps\ArcGis\Portal\
AGSSERVERD:\Apps\ArcGis\Server\ AGSSERVERD:\Apps\ArcGis\Server\
LOCALAPPDATA C:\Users\u194934\AppData\Local LOCALAPPDATA C:\Users\B000001\AppData\Local
HOMEPATH \Users\u194934 HOMEPATH \Users\B000001
APPDATAC:\Users\u194934\AppData\Roaming APPDATAC:\Users\B000001\AppData\Roaming
Path…; Path..;

 

Los ambiente desarrollo y testing, se armaron identicos que produccion , todos con el usuario B000001, en estos si entramos con ese usuario tampoco funciona , pero si entramos con  cualquier otro usuario si funciona, por ser desarrollo podemos pedir y probar esto, anda, pero no hay nada que se identifique como variable de entorno que valide la licencia de arcgis Server asociado al mismo. En produccion no podemos pedir otro usuario. ¿alguna idea?, 

0 Kudos
AnibalMmartinez
Frequent Contributor

Lanzamos el planteo al proveedor local, y este nos contesto, que existe un issue planteado sin resolución previo, y nos recomendó ir por el workaround de pedir otro usuario o recrear el que teníamos. 

El área de seguridad nos proveyó un nuevo usuario y funciona.

Gracias a @EdwinRoa y @MichaelVolz por la ayuda.

0 Kudos
IsrarKhan
New Contributor

In many cases this error happens when the license configuration is missing or not correctly linked with the ArcPy environment. Restarting the license manager or verifying the ArcGIS Pro license settings can sometimes resolve the issue. Many digital systems rely on proper verification and access control to work correctly. For example, some platforms explain how citizens can apply through the digital ration card Punjab to access government support programs.

0 Kudos
ZubiKhan
New Contributor

This error usually appears when the ArcGIS license is not properly recognized by the system. Sometimes the Python environment cannot detect the active license, especially after reinstalling or updating ArcGIS Pro. Checking the license manager settings or repairing the installation often helps fix the issue. Similar authorization and verification processes are also used in many digital service platforms where users verify their details through systems like the  BISP 8171 CNIC check online portal.

0 Kudos
LisajoneJone
New Contributor

This type of runtime error is often related to authorization problems in the ArcGIS environment. If the software cannot detect the correct license, Python scripts that use ArcPy may fail to run. It can help to check whether the ArcGIS Pro license is active or whether the license manager service is running properly. Many digital verification systems also depend on correct system authorization, similar to how the  E-Challan online check system allows users to check traffic fines through online platforms.

0 Kudos
LisajoneLisa
New Contributor

Sometimes this issue appears after uninstalling or reinstalling ArcGIS components because the license configuration becomes disconnected from the Python environment. Reconfiguring the license or repairing the ArcGIS installation may help solve the problem. Many online platforms also depend on correct authorization before allowing users to access services. For example, some websites explain the Parwaz Card registration online process for overseas jobs for people planning to work abroad.

0 Kudos