Bug:
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the failure with nonexistent channel IDs using the client.search call shown in the issue. Start at stream_chat/client.py, especially search and the response path in _parse_response, and determine where the empty-result behavior should be handled. Done means the same search returns an empty list instead of StreamAPIException.
Written by the indexing model from the issue text.
Description
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""
- Dominant language
- Python
- Stars
- 73
- Forks
- 20
- Avg merge
- 11h 34m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GetStream/stream-chat-python
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
GetStream/stream-chat-python#252 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
GetStream/stream-chat-python#244 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
GetStream/stream-chat-python#167 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
GetStream/stream-chat-python#166 · 2 comments ·
-
conda?Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
GetStream/stream-chat-python#152 ·
All issues in GetStream/stream-chat-python
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NatLabRockies/openstudio-mcp#286 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
intersystems/ipm#1338 ·
Maintainers usually reply within 1 day
-
separate_packages splits imports from the same explicitly configured packagePossibly taken @rahul05ranjan claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
The v0-through-v1 path derives ShutdownDuration its own way, silently overriding a user's definitionOpenv1
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day