laptop and a wrench

Error

When a Python script for a GP Tool is published from ArcGIS Pro to ArcGIS Enterprise, some paths are converted into alternative variables. These can cause the scripts or tools to fail with syntax errors.

Portal for ArcGIS
Número de ID del error BUG-000156284
EnviadoMarch 3, 2023
Última modificaciónJanuary 27, 2025
Relacionado conPortal for ArcGIS
Versión encontrada10.9.1
Sistema operativoWindows OS
Versión de sistema operativo10.0
EstadoAs Designed

Información adicional

These variables are expected to replace relative paths in python when published to ArcGIS Server.

Solución alternativa

Limited success has been achieved in some scripts by writing paths differently. For example:

path = "\\Test$_TableToExcel.xlsx"

Output_Excel_File = cwd + os.path.join(path)

In this approach, a new variable for the network path is created, and os.path.join is used with the variable instead of directly typing the network path. This method resolves the syntax errors.

Pasos para reproducir

ID del error: BUG-000156284

Software:

  • Portal for ArcGIS

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga