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

Connection reset by peer #18

Open
idanre1 opened this issue Sep 19, 2019 · 0 comments
Open

Connection reset by peer #18

idanre1 opened this issue Sep 19, 2019 · 0 comments

Comments

@idanre1
Copy link

idanre1 commented Sep 19, 2019

I am using alpaca_trade_api-0.39
I got new issue of connection reset by peer even though nothing is change in my code:

Traceback (most recent call last):
File "lowDollarVolume.py", line 312, in
output = run_pipeline(args.f)
File "lowDollarVolume.py", line 295, in run_pipeline
output = create_pipeline()
File "lowDollarVolume.py", line 109, in create_pipeline
exe_pipeline(eng, "symbolsDB", "step_2", ldv_step_2)
File "/home/idanre1/algo/pipeline/pipeline_wrapper.py", line 22, in exe_pipeline
df = eng.run_pipeline(pipe)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/engine.py", line 77, in run_pipeline
initial_workspace,
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/engine.py", line 244, in compute_chunk
to_load, mask_dates, symbols, mask,
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/alpaca/pricing_loader.py", line 42, in load_adjusted_array
prices = alpaca.get_stockprices(chart_range)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/alpaca.py", line 24, in get_stockprices
return get_stockprices_cached(all_symbols)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/util.py", line 68, in wrapper
body = func(*args, **kwargs)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/alpaca.py", line 22, in get_stockprices_cached
return _get_stockprices(all_symbols, limit, timespan)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/alpaca.py", line 43, in _get_stockprices
return parallelize(fetch, splitlen=199)(symbols)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/util.py", line 30, in wrapper
task_result = task.result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/idanre1/py3env/lib/python3.6/site-packages/pipeline_live/data/sources/alpaca.py", line 33, in fetch
barset = tradeapi.REST().get_barset(symbols, timespan, limit)
File "/home/idanre1/py3env/lib/python3.6/site-packages/alpaca_trade_api/rest.py", line 342, in get_barset
resp = self.data_get('/bars/{}'.format(timeframe), params)
File "/home/idanre1/py3env/lib/python3.6/site-packages/alpaca_trade_api/rest.py", line 163, in data_get
'GET', path, data, base_url=base_url, api_version='v1'
File "/home/idanre1/py3env/lib/python3.6/site-packages/alpaca_trade_api/rest.py", line 112, in _request
return self._one_request(method, url, opts, retry)
File "/home/idanre1/py3env/lib/python3.6/site-packages/alpaca_trade_api/rest.py", line 131, in _one_request
resp = self._session.request(method, url, **opts)
File "/home/idanre1/py3env/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/idanre1/py3env/lib/python3.6/site-packages/requests/sessions.py", line 686, in send
r.content
File "/home/idanre1/py3env/lib/python3.6/site-packages/requests/models.py", line 828, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/home/idanre1/py3env/lib/python3.6/site-packages/requests/models.py", line 753, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))

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

1 participant