Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: not enough values to unpack #9

Open
thinkmorestupidless opened this issue Jul 29, 2019 · 3 comments
Open

ValueError: not enough values to unpack #9

thinkmorestupidless opened this issue Jul 29, 2019 · 3 comments

Comments

@thinkmorestupidless
Copy link

Guessing i'm missing something obvious here - requires a specific (older) version of opencv-python?

Traceback (most recent call last):
  File "segment.py", line 94, in <module>
    hand = segment(gray)
  File "segment.py", line 38, in segment
    (_, cnts, _) = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)
@PR-Iyyer
Copy link

getting same error..Can someone help?

@xmik
Copy link

xmik commented Oct 21, 2019

I'm just linking the PR that fixes this: #11

@SammyJay777
Copy link

In this line: (_, cnts, _) = cv2.findContours(thresholded.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
Put (cnts, ) instead of (, cnts, _) this worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants