Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max retries exceeded with url /api/v1/ping #227

Closed
dade80vr opened this issue Mar 28, 2018 · 5 comments
Closed

Max retries exceeded with url /api/v1/ping #227

dade80vr opened this issue Mar 28, 2018 · 5 comments

Comments

@dade80vr
Copy link

Hi guys, today i got this error:

File "/Library/Python/2.7/site-packages/binance/client.py", line 94, in init
self.ping()
File "/Library/Python/2.7/site-packages/binance/client.py", line 362, in ping
return self._get('ping')
File "/Library/Python/2.7/site-packages/binance/client.py", line 206, in _get
return self._request_api('get', path, signed, version, **kwargs)
File "/Library/Python/2.7/site-packages/binance/client.py", line 180, in _request_api
return self._request(method, uri, signed, **kwargs)
File "/Library/Python/2.7/site-packages/binance/client.py", line 174, in _request
response = getattr(self.session, method)(uri, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/ping (Caused by SSLError(SSLError(1, u'[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)'),))

Any thoughts? Thank you.

@dade80vr
Copy link
Author

@dash61 thanks, solved
Also solved with a fresh installation of binance-python on a virtualenv

@scalpounet
Copy link

Hello,
I wrote the code below

"klines = client.get_historical_klines(ccy, Client.KLINE_INTERVAL_1MINUTE, "30 min ago UTC")"

I run the code every five seconds on binance.
My system Python 3.6, I use Jupyter notebook and I have windows 10.

The code runs for a few hours and then I have the following message:

ConnectionError: HTTPSConnectionPool(host='api.binance.com', port=443): Max retries exceeded with url: /api/v1/klines?interval=1m&limit=1&startTime=0&symbol=BTCUSDT (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001D3ECBBF0F0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

Is there anyone who saw the same issue?

Many thanks,
Pascal

@anson-vandoren
Copy link
Contributor

@scalpounet that's a network connection error, not an error due to python-binance. If it happened every time you tried to get new data, it would likely be a setup issue somewhere, but if it runs OK most of the time for you, it's more likely just an internet connection issue. This could be on your side or on Binance's side, but most likely somewhere between you and your ISP.

Do you have intermittent connection issues on your normal internet connection (or home Wi-Fi)? Do you have the same issue if you run the code from a different internet connection (work/school/coffee shop/etc?)

@scalpounet
Copy link

Hi anson-vandoren,

Thank you very much for your quick answer. It might effectively be my ISP as sometimes there are intermittent interruptions. It happened twice in the last two days and I started to run this code over the last two days. I will give time and see how it goes. I thought it was an error due to python-binance because "Max retries exceeded with url..." but I am a beginner in coding so I had it wrong.

I have not tried on another network so far as I run the code at home the whole day.

Let's see how it goes and thank you very much for your help. I consider this issue closed.

Happy New Year!

@akshayparate123
Copy link

Install pyopenssl (pip install pyopenssl) and if possible try to put small delay in code .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants