laptop and a wrench

Error

Executing arcgis.gis.server.LogManager.query() method returns the error message: "AttributeError: 'GIS' object has no attribute 'post'".

Última publicación: October 5, 2022 ArcGIS API for Python
Número de ID del error BUG-000149808
EnviadoJune 7, 2022
Última modificaciónJune 5, 2024
Relacionado conArcGIS API for Python
Versión encontrada1.9.1
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
Versión corregida2.1.0
EstadoFixed

Solución alternativa

Use the following Python script to query the ArcGIS Server logs, but the query() method is only working with the Python DateTime object as inputs for both start_time and end_time arguments. Based on the ArcGIS API for Python documentation for the server.LogManager.query() method, the start_time can be 'specified in milliseconds since UNIX epoch, or as an ArcGIS Server timestamp. For example { “startTime”: “2011-08-01T15:17:20,123”, … }, { “startTime”: 1312237040123, … }, respectively"'. However, the Python DateTime object is the only acceptable argument for both the start_time and end_time parameters in the query() method.

 

import datetime

import arcgis

from arcgis.gis import server

 

start_time = datetime.datetime(2022, 5, 17)

end_time = datetime.datetime(2022, 5, 20)

results = server.Server(

   url="arcgis_server_admin_url", username="username", password="password").logs.query(start_time=start_time, end_time=end_time)

print(results['logMessages'])

Pasos para reproducir

ID del error: BUG-000149808

Software:

  • ArcGIS API for Python

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
Esri Support AI Chatbot