module 'websocket' has no attribute 'create_connection'
时间: 2023-08-04 11:05:19 浏览: 378
回答: 当出现"module 'websocket' has no attribute 'create_connection'"的错误时,这通常是因为你安装的websocket模块没有create_connection属性。\[1\]解决这个问题的方法是使用websocket-client模块替代websocket模块。你可以通过运行以下命令来安装websocket-client模块:pip uninstall websocket,pip install websocket-client。\[3\]这样就可以解决这个错误了。
#### 引用[.reference_title]
- *1* [Espressif-IDE NameError: name ‘websocket‘ is not defined 解决方法](https://blog.csdn.net/tcjy1000/article/details/127953990)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [AttributeError: ‘module‘ object has no attribute ‘create_connection](https://blog.csdn.net/w5688414/article/details/126025280)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文