AttributeError: partially initialized module datetime has no attribute date
AttributeError: partially initialized module 'datetime' has no attribute 'date' (most likely due to a circular import)
This error most often appears when the file has the same name as an imported module
or as a reserved Python name.
In this case the file is called
datetime.py
and it imports the module
datetime
The obvious solution is to rename the file.
Article author: Andrei Olegovich