An object is hashable if it has a hash value which never changes during its lifetime. As an UTCDateTime object may change over time, it’s not hashable. Use the datetime() method to generate a datetime.datetime object for hashing. But be aware: once the UTCDateTime object changes, the hash is not valid anymore.