Open aminalaghband opened 3 months ago
Hi @cryptoer-satoshi,
Thanks for reporting this issue. It seems that the error is related to converting datetime objects to integers in the VehicleDetectionTracker.py file.
To assist you better, could you please provide examples of the data you're working with when this error occurs? This will help us understand the context in which it's happening and how we can address it more effectively.
Looking forward to your response so we can continue working on a solution.
Thank you!
Hi sergio11
I was working with mp4 file which was the input, so I get this error :
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'datetime.datetime'
then I tried to change package line from:
delta_t = int(t2) - int(t1)
to this :
delta_t = t2.timestamp() - t1.timestamp()
so, it works well,
by the way, thank you for great work.
Same issue for me:
File "/Users/wdecorte/Documents/GitHub/vehicle-detection-fastapi/.venv/lib/python3.9/site-packages/VehicleDetectionTracker/VehicleDetectionTracker.py", line 195, in process_frame delta_t = int(t2) - int(t1) TypeError: int() argument must be a string, a bytes-like object or a number, not 'datetime.datetime' INFO: Shutting down
I was processing an mp4 file locally.
Hi @wimdecorte
Could you test with the last version 0.0.32? This issue is already fixed in this version which I just launched
Hi @sergio11 ,
That was using 0.0.32. Changing line 195 fixes the issue as per @cryptoer-satoshi 👍
/workspace/vehicle_detection_tracker/examples/OpenCvTrackerTest.py", line 19, in
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/VehicleDetectionTracker/VehicleDetectionTracker.py", line 291, in process_video
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/VehicleDetectionTracker/VehicleDetectionTracker.py", line 195, in process_frame
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'datetime.datetime'
we need to change the package code,
delta_t = t2.timestamp() - t1.timestamp()