Kawaboongawa / Zolver

Automatic jigsaw puzzle solver
MIT License
157 stars 32 forks source link

Not enough values to unpack (expected 3, got 2) #4

Closed ruijiehe closed 3 years ago

ruijiehe commented 3 years ago

Traceback (most recent call last):

  File "C:\Users\Focus\Documents\Code\JPsolver\Zolver-master\src\GUI\SolveThread.py", line 16, in run
    Puzzle(self.path, self.viewer, self.green_screen)
  File "C:\Users\Focus\Documents\Code\JPsolver\Zolver-master\src\Puzzle\Puzzle.py", line 35, in __init__
    self.pieces_ = self.extract.extract()
  File "C:\Users\Focus\Documents\Code\JPsolver\Zolver-master\src\Puzzle\Extractor.py", line 106, in extract
    fill_holes()
  File "C:\Users\Focus\Documents\Code\JPsolver\Zolver-master\src\Puzzle\Extractor.py", line 75, in fill_holes
    _, contour, _ = cv2.findContours(self.img_bw, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)

Error prompt when trying to solve the example puzzles. Is there a change in any function in the opencv module that lead to this error?

ruijiehe commented 3 years ago

https://stackoverflow.com/questions/54164630/want-to-find-contours-valueerror-not-enough-values-to-unpack-expected-3-go Found the answer here.