unhelpful `AlgoliaUnreachableHostException` error

未关闭
#565 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
api

调研方向

issue 中没有指定源文件或测试。首先使用提供的 821 条记录输入重现失败,并跟踪 AlgoliaUnreachableHostException 在何处抛出;将这条路径与正常工作的一条记录示例进行比较。当失败能够揭示有用且可采取行动的原因,而不只是报告无法访问的主机时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

I have a dictionary with records that I'm trying to use to generate an index. But when trying to do

request_options = {
    "autoGenerateObjectIDIfNotExist":True,
}

index.replace_all_objects(records, request_options)

I get

    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.

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

主要语言
Python
星标
207
派生
63
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

algolia/algoliasearch-client-python 的其他 Issue

查看 algolia/algoliasearch-client-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。