Paste the whole traceback plus your version, and get back three things: what actually went wrong, the smallest change that fixes it, and how to check the fix held.
It works from the real frames and message in your traceback rather than generic advice, which is what makes it useful for errors you have not seen before.
Python Error Explainer
Paste a Python traceback and get the cause in plain words, the fix, and how to confirm it worked.
Open the tool — this example is already filled in