◐ Shell
clean mode source ↗

Time, date, datetime Property handling

Create a Property with DType time, date or datetime will fail, if the corresponding value is not appropriately formatted as specified in dtypes.py.

     # fails with message 'odml.Property.values: passed values are not of consistent type!'
     prop = odml.Property(name="dateprop", dtype=odml.DType.date, value=['20190707'])
     # works fine
     prop = odml.Property(name="dateprop", dtype=odml.DType.date, value=['2019-07-07'])

This behavior is fine, but the resulting error message should be helpful in pointing towards the expected, correct format.