-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
运行 examples/websockets_chat.py 报错,同样的 ak 和 agent id="7494250598792495139" 可以使用 chat,不知是否有其他如白名单之类限制?
weaver@weavers-MacBook-Air coze-py % /usr/bin/python3 /Users/weaver/joyai/coze-py/examples/websockets_chat.py
/Users/weaver/joyai/coze-py/examples/websockets_chat.py:147: DeprecationWarning: The 'coze.SyncAuth' use for AsyncCoze is deprecated and will be removed in a future version. Please use 'coze.AsyncAuth' instead.
coze = AsyncCoze(
[cozepy][INFO][2025-04-21 00:06:36] [v1/chat] connected to websocket
[cozepy][INFO][2025-04-21 00:06:36] Error occurred: event_type=<WebsocketsEventType.ERROR: 'error'> id='09df140e-9cd3-4029-9e65-62872c275cc1' detail=Detail(logid='021745165196596fdbddc02000e01430000000000000015666c55') data=CozeAPIError('code: 4101, msg: Your token does not have permission to access resource. Please verify whether the resource ID or token is correct., logid: 021745165196596fdbddc02000e01430000000000000015666c55')
[cozepy][INFO][2025-04-21 00:06:36] Stack trace:
NoneType: None
[cozepy][INFO][2025-04-21 00:06:36] Error occurred: received 1005 (no status received [internal]); then sent 1005 (no status received [internal])
[cozepy][INFO][2025-04-21 00:06:36] Stack trace:
Traceback (most recent call last):
File "/Users/weaver/Library/Python/3.9/lib/python/site-packages/cozepy/websockets/ws.py", line 460, in _receive_loop
data = await self._ws.recv()
File "/Users/weaver/Library/Python/3.9/lib/python/site-packages/websockets/asyncio/connection.py", line 313, in recv
raise self.protocol.close_exc from self.recv_exc
websockets.exceptions.ConnectionClosedOK: received 1005 (no status received [internal]); then sent 1005 (no status received [internal])
Metadata
Metadata
Assignees
Labels
No labels