investpy icon indicating copy to clipboard operation
investpy copied to clipboard

API not working + Error Handling (Error 111 + Error 110)

Open QuantumCrazy opened this issue 2 years ago • 0 comments

Hi, I usually grab data every day using investpy but since yesterday it has not been working. I normally grab indices, FX, commodities, US treasuries but it has been throwing me Error 110 (time out) and Error 111 (connection refused).

I usually use the requests package in python with other api's and have written some code to handle exceptions, but for this api, what's the best way to handle http exceptions? And why are these errors happening? Has anything changed lately?

Update: I managed to resolve the errors, but the part of my question about exception handling still stands - can somebody please advise good error handling practice for investpy?

QuantumCrazy avatar Nov 19 '21 09:11 QuantumCrazy