Unhelpful Algolia Unreachable Host Exception error

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

request_options = {

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 = {
    "readTimeout": 300,
    "writeTimeout": 300,

How do I debug the issue?

  • I’m on:
    algoliasearch 3.0.0 pypi_0 pypi
    Python 3.10.13