Feb-01-2021, 01:21 AM
(Feb-01-2021, 12:45 AM)Larz60+ Wrote: It is not working because it is not indented properly.He has edit his post and fixed indentation.
The reason why it not work now is what i explain in my post.
Just one more point ifigazsi you should not use bare
except:
Now it hide the real error and just print
error
,which tell you nothing.import datetime t = datetime.time(7, 0) d = datetime.datetime(2021, 1, 1, 7, 0) min_delta = datetime.timedelta(minutes=45) print(t + min_delta)
Error:Traceback (most recent call last):
File "<module4>", line 6, in <module>
TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta'