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
Read More:
- Python Run Error: TypeError: hog() got an unexpected keyword argument ‘visualise‘”
- [Solved] TypeError: __init__() missing 1 required positional argument: ‘on_delete’
- [Solved] jupyter notebook Error: ModuleNotFoundError: No module named jupyter_nbextensions_configurator
- [Solved] Python Error: positional argument follows keyword argument
- [Solved] Jupyter notebook use pyLDAvis Error: modulenotfounderror: no module named ‘pyLDAvis’‘
- How to Solve jupyter notebook Read CSV files Error
- [Solved] Jupyter Notebook Start Error: Fatal error in launcher: Unable to create process using
- [Solved] Jupyter Notebook Error: SparkException: Python worker failed to connect back
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- jupyter notebook Use pyLDAvis Error: AttributeError: module ‘pyLDAvis‘ has no attribute ‘gensim
- [Solved] jupyter notebook Error: 500 : Internal Server Error
- [Solved] Python Error: TypeError: write() argument must be str, not bytes
- [Solved] TypeError: xx takes 1 positional argument but 4 were given
- Django Render home error: TypeError at /render() missing 1 required positional argument: ‘template_name‘
- [Solved] RuntimeError: run loop already started raise RuntimeError(‘run loop already started‘)
- Python Error: SyntaxError: ‘break‘ outside loop
- [Solved] cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function “pointPolygonTest“
- [Solved] Python Error: asyncio RuntimeError: This event loop is already running
- [Python] error in installing jupyter: defaulting to user installation because normal Requirement already satisfied
- Python ValueError: only 2 non-keyword arguments accepted