afiqharith / social-distancing-violation-system

Social Distancing Violation System (SODV) developed using YOLOv3 MS COCO pre-trained model and OpenCV.
MIT License
8 stars 6 forks source link

'type' object is not subscriptable #1

Open mhmrahmati opened 1 year ago

mhmrahmati commented 1 year ago

Hi, I got the bellow error when i wanted to run the code.

Traceback (most recent call last): File "social_distancing_violation_system.py", line 58, in <module> class MainCtrl: File "social_distancing_violation_system.py", line 185, in MainCtrl def get_roi_frame(self, frame, coordinate: list[tuple]): TypeError: 'type' object is not subscriptable

I have python version 3.8.0 (2019) and all requirements.txt have installed successfully. is it about python version?

afiqharith commented 1 year ago

Hi @mhmrahmati , I think it related to the python version. You may try to use from __future__ import annotations to fix the issue. You may also refer this link regarding the issue.