laptop and a wrench

Bug

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

Last Published: December 5, 2019 ArcGIS Pro
Bug ID Number BUG-000125894
SubmittedOctober 10, 2019
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found2.4.1
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

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'.

Workaround

  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.

 

Steps to Reproduce

Bug ID: BUG-000125894

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options