EvilPort2/SimpleGestureRecognition

UnboundLocalError: local variable 'line_pts' referenced before assignment

dacab17 opened this issue · 3 comments

Traceback (most recent call last): File "D:\Python Modules\Sample Downloaded Projects\SimpleGestureRecognition-master\SimpleGestureRecognition-master\gesture_action.py", line 136, in gesture_action() File "D:\Python Modules\Sample Downloaded Projects\SimpleGestureRecognition-master\SimpleGestureRecognition-master\gesture_action.py", line 88, in gesture_action line_pts.appendleft(tuple(center1)) UnboundLocalError: local variable 'line_pts' referenced before assignment

Does this work with python 3? I am using python 3.5 with opencv 3.2.0

By the way I am running your version 1 the not updated one

Since I wrote this program a long time back, I do not remember the exact code. Try adding this line

line_pts = deque(maxlen = buff) 

at the beginning of gesture_action() function before the while loop.
BTW plz rename the issue to something smaller.

Can I close this issue? Answer within 2 days after which I will close the issue.