Are you running the code in a Jupyter notebook?
If so, could you rerun it in a terminal and post the complete stack trace here?
PS: you can post code snippets by wrapping them into three backticks ```