Debug an error message
Find the cause of an error and fix it, with an explanation.
I'm getting this error: ``` [paste full error message and stack trace] ``` Relevant code: ``` [paste the code around where the error happens] ``` Environment: [language version, framework, OS] What I expected: [behaviour] What I've tried: [list] Explain the most likely cause, give the fix, and explain why it works. If there are several possible causes, list them in order of likelihood with a way to check each.
How to use it
Include the full error and what you've already tried. Remove passwords and API keys from code before pasting.