algolia / algoliasearch-client-python

⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
MIT License
196 stars 67 forks source link

unhelpful `AlgoliaUnreachableHostException` error #565

Open ncclementi opened 6 months ago

ncclementi commented 6 months ago

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:

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?

kylegibson commented 4 months ago

This is happening to me but with the AccountClient.copy_index method.