"ModuleNotFoundError: No module named 'websockets.exceptions'; 'websockets' is not a package" p



23:56~$python3.8 connect.py Traceback(最后一次调用(:
文件"connect.py";,第7行,在从binance.client导入客户端文件"/home/utkandD/.local/lib/python3.8/site packages/binance/init.py";,第10行,in从binance.depthcache导入DepthCacheManager,OptionsDepthCacheManager,ThreadedDepthCacheManager#noqa文件"home/utkandD/.local/lib/python3.8/site packages/binance/depthcache.py";,第7行,在从.streams导入BinanceSocketManager文件"/home/utkandD/.local/lib/python3.8/site packages/binance/streams.py";,第13行,infrom websockets.exceptions import ConnectionClosedError ModuleNotFoundError:没有名为"websockets.exceptions"的模块;"websockets"不是包

看起来你有一个叫做"websockets";在websockets模块之前的Python路径上(可能是websockets.py(,所以您的导入失败,因为您试图从错误的地方导入。

最新更新