Open JohnCTillis opened 1 year ago
Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 112, in _get_module_details File "/home/user/programming/chess/putzmain.py", line 216, in <module> alltemps = np.load('pbarrs.npz').items()[0][1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ TypeError: 'ItemsView' object is not subscriptable
This error occurs simply when trying to run the script normally like so:
python3 -m putzmain.py -f board.png -o out.txt
If you're using OpenCV 4.0 or later, modify the line in putzlib.py, contourbox function:
_,contours,_ = cv2.findContours(ee, 1, 2)
replace with: contours, _ = cv2.findContours(ee, 1, 2) # Remove the first '_'
You might have to do this in the lib py file as well.
This error occurs simply when trying to run the script normally like so: