algolia / algolia/algoliasearch-client-python
unhelpful `AlgoliaUnreachableHostException` error
- 主要语言
- Python
- 星标
- 207
- 派生
- 63
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
调研方向
issue 中没有指定源文件或测试。首先使用提供的 821 条记录输入重现失败,并跟踪 AlgoliaUnreachableHostException 在何处抛出;将这条路径与正常工作的一条记录示例进行比较。当失败能够揭示有用且可采取行动的原因,而不只是报告无法访问的主机时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100