laptop and a wrench

Erro

The arcgis.gis.server.Server.logs.query() method does not honor the time interval defined between start_time and end_time with the datetime formats that are mentioned in the ArcGIS API for Python documentation or reference.

Última Publicação: August 23, 2022 ArcGIS API for Python
Número de ID do Erro BUG-000149816
EnviadoJune 7, 2022
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS API for Python
Versão encontrada1.9.1
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão FixaQ1 2023 (2.1.0)
StatusFixed

Solução Provisória

Use the Python script below by specifying the Python datetime object for the 'start_time' and 'end_time' arguments in the query() method using any code editor.

 

# Import modules

import datetime

import arcgis

from arcgis.gis import server

 

# Defining various Date Time formats as inputs for start_time and end_time arguments

# Datetime Python Object

start_time = datetime.datetime(2022, 6, 6)

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

 

# ArcGIS Server Timestamp(String Datetime)

# start_time = '2022-06-06T16:56:26,911'

# end_time = '2022-06-05T16:56:26,911'

 

# UNIX Epoch(Integer)

# start_time = 1654548986911

# end_time = 1654462586911

 

# Float

# start_time = 1654548986911.0

# end_time = 1654462586911.0

 

# Irrelevant String

# start_time = 'badtimestring'

# end_time = 'bad'

 

# Boolean (Irrelevant Object)

# start_time = True

# end_time = True

 

# Query logs

log_results = server.Server(url='server_admin_url', username='username', password='password').logs.query(start_time=start_time, end_time=end_time)

Etapas para Reproduzir

ID do Erro: BUG-000149816

Software:

  • ArcGIS API for Python

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download