algolia / algolia/algoliasearch-client-python
unhelpful `AlgoliaUnreachableHostException` error
- Dominant language
- Python
- Stars
- 207
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
I have a dictionary with records that I'm trying to use to generate an index. But when trying to do
```python
request_options = {
"autoGenerateObjectIDIfNotExist":True,
}
index.replace_all_objects(records, request_options)
```
I get
```python-traceback
raise AlgoliaUnreachableHostException("Unreachable hosts")
algoliasearch.exceptions.AlgoliaUnreachableHostException: Unreachable hosts
```
But if I try a dummy example where records is `[{"test": "test"}]` things work. It is unclear to me what's happening, because the error message is not helpful.
For the record:
- each record size are <10KB
- the `records` list has only 821 objects.
I've tried adding read and write timeouts but it doesn't seem to help.
```python
request_options = {
"autoGenerateObjectIDIfNotExist":True,
"readTimeout": 300,
"writeTimeout": 300,
}
```
How do I debug the issue?
- Algolia Client Version:
`algoliasearch 3.0.0 pypi_0 pypi`
- Language Version:
Python 3.10.13
Contributor guide
Research direction
No source file or test is named in the issue. Start by reproducing the failure with the provided 821-record input and trace where AlgoliaUnreachableHostException is raised; compare that path with the working one-record example. Done means the failure exposes a useful, actionable cause instead of only reporting unreachable hosts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100