Bug:
還沒有人認領這個 Issue。
評估
研究方向
使用 issue 中所示的 client.search 呼叫,重現使用不存在的頻道 ID 時發生的失敗。從 stream_chat/client.py 開始,特別檢查 search 以及 _parse_response 中的回應路徑,並確定應在哪裡處理空結果行為。完成的標準是相同的搜尋回傳空列表,而不是 StreamAPIException。
由索引模型根據 Issue 內容生成。
描述
When I use the client.search function for some channels ids which doesn't exist, instead of returning an empty list it gives me the following error:
Traceback (most recent call last):
File "senti_abuse_analysis.py", line 177, in <module>
response = client.search({"id": {"$in": channel_ids}}, {"updated_at":{"$gt": previous_max_date}}, limit=400)
File "/home/ec2-user/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/stream_chat/client.py", line 358, in search
return self.get("search", params={"payload": json.dumps(params)})
File "/home/ec2-user/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/stream_chat/client.py", line 90, in get
return self._make_request(self.session.get, relative_url, params, None)
File "/home/ec2-user/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/stream_chat/client.py", line 77, in _make_request
return self._parse_response(response)
File "/home/ec2-user/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/stream_chat/client.py", line 46, in _parse_response
raise StreamAPIException(response.text, response.status_code)
stream_chat.base.exceptions.StreamAPIException: StreamChat error code 4: Search failed with error: "There are no searchable channels""
- 主要語言
- Python
- 星號
- 73
- 分支
- 20
- 平均合併
- 11 小時 34 分鐘
- 30 天內合併 PR
- 7
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
GetStream/stream-chat-python 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
GetStream/stream-chat-python#252 ·
-
難度 4/5 3-5 天 新手友好度 42/100
GetStream/stream-chat-python#244 ·
-
enhancement
難度 5/5 一週以上 新手友好度 25/100
GetStream/stream-chat-python#167 · 5 則留言 ·
-
難度 3/5 1-2 天 新手友好度 35/100
GetStream/stream-chat-python#166 · 2 則留言 ·
-
conda?未關閉
難度 5/5 一週以上 新手友好度 15/100
GetStream/stream-chat-python#152 ·
查看 GetStream/stream-chat-python 的全部 Issue
相似的 Issue
-
bug
難度 1/5 1 小時以內 新手友好度 85/100
NatLabRockies/openstudio-mcp#286 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
-
bug
難度 2/5 1-3 小時 新手友好度 65/100
intersystems/ipm#1338 ·
維護者通常 1 天內回覆
-
separate_packages splits imports from the same explicitly configured package可能已有人在做 @rahul05ranjan 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
The v0-through-v1 path derives ShutdownDuration its own way, silently overriding a user's definition未關閉v1
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆