Tag Archives: XXX got an unexpected keyword argument XXX

[Solved] Jupyter notebook: TypeError: __init__() got an unexpected keyword argument ‘io_loop’

When opening a Python file today, an error message was reported:
TypeError: __init__() got an unexpected keyword argument’io_loop’
Obviously it is a file copied from the old computer to the new computer. The previous operation was OK. Why did it report an error when running on the new computer?
wrong reason:
When configuring the python environment, the default tornado version is the latest version (it happens that my new computer reconfigured the python environment, so I installed the latest version), but the io_loop parameter was discarded after version 4.0.
solution:
1. First uninstall the currently installed tornado
pip uninstall tornado
2. Install the lower version of tornado
pip install tornado==4.1
After the installation is successful, re-execute the python file and it can run normally