laptop and a wrench

漏洞

In ArcGIS Pro's default Python environment, Python library datetime fails if 'from datetime import datetime' is listed before 'import arcpy'.

上次发布: December 5, 2019 ArcGIS Pro
漏洞 ID 编号 BUG-000125894
已提交October 10, 2019
上次修改时间June 5, 2024
适用范围ArcGIS Pro
找到的版本2.4.1
操作系统Windows OS
操作系统版本10.0
状态Will Not Be Addressed

附加信息

A name collision results because of a datetime module import in arcpy. Use an alias when importing the datetime class, such as 'from datetime import datetime as dt'.

解决办法

  1. Run the script again after seeing the error.
  2. No error is returned with the second run.
  3. List 'import arcpy' before 'from datetime import datetime'. No error is returned.

 

重现步骤

漏洞 ID: BUG-000125894

软件:

  • ArcGIS Pro

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项