GoldrenEggs / BiLiveir

异步bilibili直播信息流(弹幕、抽奖、礼物等)处理框架。
MIT License
5 stars 1 forks source link

函数websocket.create_connection()丢失 #2

Closed KKingwang closed 11 months ago

KKingwang commented 1 year ago

大佬我想问一下为什么我的websocket库里没有这个函数 AttributeError: module 'websocket' has no attribute 'create_connection'

环境: windows11

conda python 3.10

websocket 0.2.1 websocket-client 1.4.2

报错信息: Traceback (most recent call last): File "C:\Users\bai\Desktop\bilibili-Game\minimize.py", line 4, in live = Live(544843) # 创建一个Live对象,参数为房间号(roomid) File "C:\Users\bai\Desktop\bilibili-Game\src\crawler.py", line 131, in init self.web = LiveMessage(room_id, logger) File "C:\Users\bai\Desktop\bilibili-Game\src\crawler.py", line 50, in init self.webs = websocket.create_connection("ws://broadcastlv.chat.bilibili.com:2244/sub") AttributeError: module 'websocket' has no attribute 'create_connection'

尝试了更新websocker还是没有这个函数

Griklit commented 11 months ago

你没安装websocket-client