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

RuntimeWarning: coroutine 'StreamConn.close' was never awaited #15

Open
stabless opened this issue Mar 31, 2020 · 4 comments
Open

RuntimeWarning: coroutine 'StreamConn.close' was never awaited #15

stabless opened this issue Mar 31, 2020 · 4 comments

Comments

@stabless
Copy link

Interesting problem - any ideas what is causing this ?

354/354
Success.
Watching 354 symbols.
WARNING:root:code = 1000 (OK), no reason
:375: RuntimeWarning: coroutine 'StreamConn.close' was never awaited
conn.close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
WARNING:root:server rejected WebSocket connection: HTTP 429
Cannot close a running event loop
WARNING:root:code = 1000 (OK), no reason
WARNING:root:server rejected WebSocket connection: HTTP 429
WARNING:root:server rejected WebSocket connection: HTTP 429
Cannot close a running event loop
Cannot close a running event loop

@nhodges
Copy link

nhodges commented May 22, 2020

@stabless did you ever figure this out?

1 similar comment
@thepetlyon
Copy link

@stabless did you ever figure this out?

@BlueMistTrekker
Copy link

I am getting a similar message. Does anyone know how to debug this?

Getting current ticker data...
Success.
Tracking 226 symbols.
Getting historical data...
1/226
.
.
.
226/226
Success.
Watching 226 symbols.
unknown channel A.BBAR (you may need to specify the right data_stream)
algo.py:386: RuntimeWarning: coroutine 'StreamConn.close' was never awaited
conn.close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Event loop is closed
.
.
.
Event loop is closed
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x00007f681b498740 (most recent call first):
File "/usr/lib/python3.7/asyncio/base_events.py", line 480 in _check_closed
File "/usr/lib/python3.7/asyncio/base_events.py", line 560 in run_until_complete
File "/usr/local/lib/python3.7/dist-packages/alpaca_trade_api/stream2.py", line 275 in run
File "algo.py", line 383 in run_ws
.
.
.
File "algo.py", line 387 in run_ws
...
Aborted

@sanzgiri
Copy link

sanzgiri commented Jun 30, 2020

BlueMistTrekker, I am getting the same error. Let me know if you find a solution.

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

5 participants