Commit Graph

12 Commits

Author SHA1 Message Date
misyaguziya
78a580f521 OSCQueryの名前解決のためservice名をユニークに変更
service_nameを "VRCT" -> f"VRCT:{UTC}"
2025-10-08 13:01:16 +09:00
google-labs-jules[bot]
172617a523 Fix: Enhance logging for OSError and prevent AttributeError
This commit addresses two potential issues related to issue #50:

1.  Enhanced `OSError` Logging in `utils.py`:
    The `printResponse` function in `src-python/utils.py` has been modified
    to include more robust error handling around the `json.dumps()` call.
    If an `OSError` (such as `[Errno 22] Invalid argument`) occurs during
    JSON serialization, the function will now:
    - Log the full traceback of the OSError.
    - Log the specific problematic response dictionary that caused the error.
    - Print a fallback JSON error message to stdout.
    This change aims to help diagnose the root cause of the `OSError`
    reported by you by capturing the exact data that triggers it.

2.  Prevent `AttributeError` for `.close()` calls:
    Added checks in `src-python/models/osc/osc.py` and
    `src-python/models/websocket/websocket_server.py` to ensure that
    objects are not `None` before their `.close()` or `.cancel()` methods
    are called. This specifically addresses:
    - `self.browser.zc.close()` and `self.browser.browser.cancel()` in `osc.py`.
    - `self._loop.close()` in `websocket_server.py`.
    These changes prevent potential `AttributeError: 'NoneType' object
    has no attribute 'close'` errors if these objects are not fully
    initialized before cleanup.
2025-06-18 14:47:17 +00:00
misyaguziya
bdaccdf421 [Update] OSC: Improve error handling and refactor OSC server initialization 2025-05-25 22:15:53 +09:00
misyaguziya
23fc46bd0f [Update] OSC: Refactor OSC query handling and add enable/disable methods 2025-05-25 15:42:33 +09:00
misyaguziya
279fc1f66d [Update] OSCHandler: Enhance OSC query handling and refactor mute status management 2025-05-24 21:51:11 +09:00
misyaguziya
2e424fcc2a [Update] Optimize OSCQueryBrowser usage and reduce CPU load in OSC server 2025-05-05 17:06:23 +09:00
misyaguziya
3fa819df3f 👍️[Update] All : 不要なprintLogを削除 / なるべくtry exceptした場合にはerrorLogを保存するように変更 2024-12-16 23:38:05 +09:00
misyaguziya
347b71561f 👍️[Update] Model : OSCQueryServiceの起動処理を起動するまで処理するようにロールバック 2024-11-25 17:49:06 +09:00
misyaguziya
81232fdefc 👍️[Update] Model : OSCQueryServiceの起動処理をリトライに変更
起動処理に成功しない場合、Mute同期機能を有効にできないように変更
2024-11-25 14:39:13 +09:00
misyaguziya
2e26038eab 👍️[Update] Model : OSCQueryServiceを強制的に起動するように修正 2024-11-23 23:45:59 +09:00
misyaguziya
7350910c7b 👍️[Update] Model : ミュート同期の処理を見直し 2024-11-04 22:44:01 +09:00
misyaguziya
f79735f13c 👍️[Update] Model : rename osc_tools.py -> osc.py 2024-11-04 06:29:36 +09:00