RomelTorres / alpha_vantage

A python wrapper for Alpha Vantage API for financial data.
MIT License
4.3k stars 741 forks source link

An existing connection was forcibly closed by the remote host #323

Closed Haseeb90 closed 1 year ago

Haseeb90 commented 3 years ago

This keeps happening even if I'm putting 30 second sleeps in between the calls being made. Here's the code I have ` from alpha_vantage.timeseries import TimeSeries ts = TimeSeries(key='KEY', output_format='pandas')

def get_data(ticker):
    price_data, meta_data = ts.get_daily_adjusted(ticker, outputsize='full')
    price_data = price_data.rename(columns=column_translations)

    price_data = price_data.sort_values(['date'], ascending=True)

    return price_data`

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) During handling of the above exception, another exception occurred: raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

AlphaVantageSupport commented 1 year ago

Closing for now. Will reopen if there is further community response. Thanks!