laptop and a wrench

不具合

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

最後に公開された状態: October 5, 2022 ArcGIS API for Python
不具合 ID 番号 BUG-000149808
送信されましたJune 7, 2022
最終更新日June 5, 2024
適用対象ArcGIS API for Python
見つかったバージョン1.9.1
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0 64 Bit
修正されたバージョン2.1.0
ステータスFixed

対処法

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'])

再現の手順

不具合 ID: BUG-000149808

ソフトウェア:

  • ArcGIS API for Python

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動
Esri Support AI Chatbot