slazarov / python-bittrex-websocket-aio

Python websocket for Bittrex (async).
http://python-bittrex-websocket-docs.readthedocs.io/en/latest/index.html#
MIT License
36 stars 13 forks source link

Coroutine on_public was never awaited error ? #13

Closed sahfd4eiugf closed 5 years ago

sahfd4eiugf commented 6 years ago

/usr/lib/python3.6/site-packages/events/events.py:95: RuntimeWarning: coroutine 'Bittrex.on_public' was never awaited f(*a, **kw) ^CTraceback (most recent call last): File "async130.py", line 565, in time.sleep(1337)

I am getting this error on 3.6.5 but strangely on 3.6.3 I dont get it.

PS: thanks for the lib, is this possible to donate BTC somewhere?

slazarov commented 6 years ago

Post the script.

On Oct 23, 2018 at 2:40 pm, <sahfd4eiugf (mailto:notifications@github.com)> wrote:

/usr/lib/python3.6/site-packages/events/events.py:95: RuntimeWarning: coroutine 'Bittrex.on_public' was never awaited f(*a, **kw) ^CTraceback (most recent call last): File "async130.py", line 565, in time.sleep(1337)

I am getting this error on 3.6.5 but strangely on 3.6.3 I dont get it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/slazarov/python-bittrex-websocket-aio/issues/13), or mute the thread (https://github.com/notifications/unsubscribe-auth/AbVUG4L0fQ3YKSCOZVnGawH39d_6ELTUks5unwAwgaJpZM4X1Xlz).

mkang1234 commented 5 years ago

Post the script. On Oct 23, 2018 at 2:40 pm, <sahfd4eiugf @.)> wrote: /usr/lib/python3.6/site-packages/events/events.py:95: RuntimeWarning: coroutine 'Bittrex.on_public' was never awaited f(a, kw) ^CTraceback (most recent call last): File "async130.py", line 565, in time.sleep(1337) I am getting this error on 3.6.5 but strangely on 3.6.3 I dont get it. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (#13), or mute the thread (https://github.com/notifications/unsubscribe-auth/AbVUG4L0fQ3YKSCOZVnGawH39d_6ELTUks5unwAwgaJpZM4X1Xlz).

I'm getting the same error too.

RuntimeWarning: coroutine 'MySocket.on_public' was never awaited f(*a, **kw)

Running the following code:

    # Create the socket instance
    ws = MySocket()

    tickers = ['BTC-ETH', 'BTC-NEO', 'BTC-ZEC', 'ETH-NEO', 'ETH-ZEC']

    ws.subscribe_to_exchange_deltas(tickers)

    while True:
        sleep(1)
slazarov commented 5 years ago

Are you overwriting the on_public method? Are the examples running without issues?

mkang1234 commented 5 years ago

Are you overwriting the on_public method? Are the examples running without issues?

No I'm not overwriting. when I run the ticker_updates example, I still get the same error. RuntimeWarning: coroutine 'main..MySocket.on_public' was never awaited f(*a, **kw)

When I run the example using the non aoi version, it works fine.

sahfd4eiugf commented 5 years ago

So I updated my pip packages ( but still stayed in python 3.6.3) and now I am getting this error again, any ideas?

sahfd4eiugf commented 5 years ago

Now I updated to 3.7.3, still same error :(

sahfd4eiugf commented 5 years ago

I think the problem is as simple as having a mix-up between bittrex-websocket-aio and bittrex-websocket, if both are installed, or the wrong one is installed.

Because both are loaded in python using the same line: from bittrex_websocket.websocket_client import BittrexSocket