cetteup / BF2AutoSpectator

An automated spectator for Battlefield 2 written in Python
MIT License
11 stars 3 forks source link

Crashes when OBS capture window update fails #95

Closed cetteup closed 1 month ago

cetteup commented 1 month ago

Exceptions raised when updating the OBS capture window crash the spectator, as they aren't caught.

2024-08-18 20:01:37,676 INFO Starting new game instance Traceback (most recent call last): File "BF2AutoSpectator\spectate.py", line 778, in File "BF2AutoSpectator\spectate.py", line 351, in run File "BF2AutoSpectator\remote\obs_client.py", line 54, in set_capture_window File "BF2AutoSpectator\remote\obs_client.py", line 62, in __try_get_input_settings File "obsws_python\reqs.py", line 770, in get_input_settings File "obsws_python\reqs.py", line 51, in send File "obsws_python\baseclient.py", line 130, in req File "websocket_core.py", line 297, in send File "websocket_core.py", line 337, in send_frame File "websocket_core.py", line 559, in send File "websocketsocket.py", line 179, in send File "websocket_socket.py", line 156, in _send ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host [6636] Failed to execute script 'spectate' due to unhandled exception!