title: Traceback - TypeError: 'set' object is not subscriptable
body: <p>I've been working on an AI, where it'll solve the a solitaire card game. Suddenly, after a few changes (which I do not know how) the console is giving me error, which is:</p>
  <p>The following code, that the error refers to:</p>
  <pre><code>def CatchingCard(self, imageName, accurate=0.90):
      finalPath = os.path.join(os.getcwd(),
                                   self.vals.ImageDepository, imageName)
      pos = TryToFindCardInGame(
          finalPath, accurate)
      if pos[0] != -1:
          EasyCatch(finalPath, pos, &quot;left&quot;, 0, False, offset=5)
          return True
      return False
  </code></pre>
  <p>And the TryToFindCardInGame:</p>
  <pre><code>def TryToFindCardInGame(image, accurate=0.8):
  cardImage = pyautogui.screenshot()
  if not retina_enabled:
      pass
  else:
      assert isinstance(cardImage.thumbnail, object)
      cardImage.thumbnail
  colorScheme = np.array(cardImage)
  colorDark = cv2.cvtColor(colorScheme, cv2.COLOR_BGR2GRAY)
  colorLayout = cv2.imread(image, 0)
  colorLayout.shape[::-1]
  
  cv_matching = cv2.matchTemplate(colorDark, colorLayout, cv2.TM_CCOEFF_NORMED)
  max_loc: object
  min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(cv_matching)
  assert isinstance(max_val, object)
  if accurate &lt;= max_val:
      return max_loc
  return {-1, -1}
  </code></pre>
  <p>Error I am getting:</p>
  <pre><code>if pos[0] != -1:
  TypeError: 'set' object is not subscriptable
  </code></pre>
  <p>I've been searching around, couldn't find a solution for my case.
  What should I look for?</p>