pyinat / pyinaturalist

Python client for iNaturalist
https://pyinaturalist.readthedocs.io
MIT License
133 stars 16 forks source link

No results for request using pyinaturalist #555

Closed Gasp34 closed 4 months ago

Gasp34 commented 4 months ago

Hello, I'm not an API expert but I'm having a problem with pyinaturalist, all my request are "stuck", I get no results and no error, I can just wait forever. But making the same request with pyinaturalist works. Do you have any idea of what is happening ?

The problem

get_taxa_autocomplete("test")

Never ends

Workarounds

requests.get("https://api.inaturalist.org/v1/taxa/autocomplete?q=test")
<Response [200]>

It does the same with other requests

JWCook commented 4 months ago

Could you enable debug logging for me, run get_taxa_autocomplete() again, and post the logs here?

Also post the output of pip freeze so I can see what dependency versions we're working with.

Gasp34 commented 4 months ago

Hi, I am sorry for the late response.

I made some investigation and the error happens when I initialize the ClientSession class, no matter the configuration. Looking further, I saw that the error appears when itinialising the class CacheMixin of the requests_cache package. So I guess this is not a bug of pyinaturalist.

The error mysteriously disappeared the next day, I think there was a problem with disk access on the server I have access to

JWCook commented 4 months ago

I'd still be interested to see any logs you have, or an error message if you got one. If there was a problem initializing the cache due to file permissions or another disk issue, I would expect to see an IOError, not to hang indefinitely.

Or if it comes up again, feel free to open an issue on requests-cache, which I also maintain.

Gasp34 commented 4 months ago

I checked the only logs I have and there is nothing unusual in it. (But debug logging was not activated)

I will do if the problem come again