kneasle / wheatley

An AI for Ringing Room that can ring any number of bells to increase the scope of practices.
https://pypi.org/project/wheatley/
MIT License
15 stars 13 forks source link

Connectivity Errors #132

Closed butlepa1 closed 3 years ago

butlepa1 commented 3 years ago

It seems since after weekend, Wheatley will no longer connect to RingingRoom. eg output i see

wheatley 456237981 -m "plain bob major" Traceback (most recent call last): File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\ctxadmin\AppData\Local\Programs\Python\Python38\Scripts\wheatley.exe__main.py", line 7, in File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\site-packages\wheatley\main.py", line 392, in main console_main(unparsed_args, stop_on_join_tower) File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\site-packages\wheatley\main.py", line 369, in console_main with tower: File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\site-packages\wheatley\tower.py", line 57, in enter__ self._create_client() File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\site-packages\wheatley\tower.py", line 161, in _create_client self._socket_io_client.connect(self._url) File "c:\users\ctxadmin\appdata\local\programs\python\python38\lib\site-packages\socketio\client.py", line 280, in connect raise exceptions.ConnectionError(exc.args[0]) from None socketio.exceptions.ConnectionError: Unexpected response from server

Everything was working before. I have tested with Python 3.85 and 3.9 on Windows 7 , Windows 10 (1909 and 2004 versions)

Setup by installing Python and then using pip to install Wheatley. Not sure if this is server end error or client?

centreboard commented 3 years ago

Thanks for the report, I agree somethings going wrong with connecting to Ringing Room from here https://github.com/kneasle/wheatley/blob/2b4f7e619028ed212b064eb0da67fe22f85944f1/wheatley/tower.py#L158-L161 https://github.com/miguelgrinberg/python-socketio/blob/f0dddfc3e30cb41c4e41591edc84fcfce920a6e2/socketio/client.py#L273-L280

What version of Wheatley are you running wheatley --version? What's the output of pip list?

butlepa1 commented 3 years ago

Hi

Output from my system

C:\Users\paul>wheatley --version Wheatley vv0.5.2

C:\Users\paul>pip list Package Version


bidict 0.21.2 certifi 2020.12.5 chardet 3.0.4 idna 2.10 numpy 1.19.3 pip 20.3.1 py 1.10.0 python-engineio 4.0.0 python-socketio 5.0.2 requests 2.25.0 setuptools 49.2.1 six 1.15.0 urllib3 1.26.2 websocket-client 0.57.0 wheatley 0.5.2

cheers

Paul

centreboard commented 3 years ago

I can reproduce this updating my copy of engineio/socketio to match yours.

Reverting to a known good version by running pip install -U python-socketio==4.6 pip install -U python-engineio==3.13.1 fixes it again for me.

@kneasle we should probably limit these package versions as well while investigating what broke.

butlepa1 commented 3 years ago

Hello

Yes confirmed working again

Thanks !

Paul

From: Matthew R Johnson notifications@github.com Sent: Tuesday, December 15, 2020 3:34 PM To: kneasle/wheatley wheatley@noreply.github.com Cc: Butler, Paul paul.butler@novartis.com; Author author@noreply.github.com Subject: Re: [kneasle/wheatley] Connectivity Errors (#132)

I can reproduce this updating my copy of engineio/socketio to match yours.

Reverting to a known good version by running pip install -U python-socketio==4.6 pip install -U python-engineio==3.13.1 fixes it again for me.

@kneaslehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kneasle&d=DwMCaQ&c=ZbgFmJjg4pdtrnL2HUJUDw&r=iZpuIqKL3J75_wXQRlK6XqJ286a5yEcYEQEiRw2X_9A&m=UETPgKReLLOEvlRFoSwdbkSG8CS62Jx1xadrTGK_Euc&s=Jd1-UQMtQb0ndC2c0sK1-uaQ3iOcIGUgUTpxd-VwLWc&e= we should probably limit these package versions as well while investigating what broke.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kneasle_wheatley_issues_132-23issuecomment-2D745332543&d=DwMCaQ&c=ZbgFmJjg4pdtrnL2HUJUDw&r=iZpuIqKL3J75_wXQRlK6XqJ286a5yEcYEQEiRw2X_9A&m=UETPgKReLLOEvlRFoSwdbkSG8CS62Jx1xadrTGK_Euc&s=1aus8Zclg3N02Gtoif6-hAOwcySK7LkBBCbviCm6GGU&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOFFMRE4P36BYFYSEHXH4NDSU5XW7ANCNFSM4U4GX63Q&d=DwMCaQ&c=ZbgFmJjg4pdtrnL2HUJUDw&r=iZpuIqKL3J75_wXQRlK6XqJ286a5yEcYEQEiRw2X_9A&m=UETPgKReLLOEvlRFoSwdbkSG8CS62Jx1xadrTGK_Euc&s=C-siCFD0TgTZ530hkGhPCHobH2K8lFqrnzFfDimiOjc&e=.

centreboard commented 3 years ago

Looks like there's a socketio protocol jump. We need to pin to version 4 and update only if RingingRoom also does. https://pypi.org/project/python-socketio/