Python-socketio: "ValueError: signal only works in main thread" when using the server

Created on 10 Feb 2020  路  1Comment  路  Source: miguelgrinberg/python-socketio

When using the server together with aiohttp, I'm getting the error

ValueError: signal only works in main thread

from https://github.com/miguelgrinberg/python-socketio/blob/master/socketio/client.py#L28. Can we have the same fix as in https://github.com/miguelgrinberg/python-engineio/commit/6534d324f3dce2e1e4927932660d5e5e8bcab202 also for socketio? That would help a lot! At the moment I'm doing this ugly workaround:

        import signal
        origsignal = signal.signal
        signal.signal = lambda x, y: None
        from socketio.asyncio_server import AsyncServer
        signal.signal = origsignal
bug

Most helpful comment

Ah yes, sorry, I missed it, this one needs to be fixed as well.

>All comments

Ah yes, sorry, I missed it, this one needs to be fixed as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sidwarkd picture sidwarkd  路  6Comments

amckinley picture amckinley  路  3Comments

DevJhns picture DevJhns  路  8Comments

rstuckey picture rstuckey  路  4Comments

alcupe picture alcupe  路  5Comments