-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
When I use the shift method, the result can become a float and I've got an error when i use to_time() after :
st_gr = pysrt.open(file) st_gr.shift(1.0) for st in st_gr: print(type(st.start.seconds),type(st.start.milliseconds)) print(st.start.to_time())
File "/home/axel/Documents/code/LWM/v2_lwm.py", line 93, in detecte_bug print(st.start.to_time()) ^^^^^^^^^^^^^^^^^^ File "/home/axel/Documents/code/LWM/lwm-env/lib/python3.12/site-packages/pysrt/srttime.py", line 176, in to_time return time(self.hours, self.minutes, self.seconds, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer
Metadata
Metadata
Assignees
Labels
No labels