Repository navigation
Open
Description
Running the latest version of the testing tool locally on a Windows machine.
Trying to subscribe to the resources, but the script throws an error:
[2025-04-13 19:54:11,378] ERROR in app: Exception on /x-nmos/query/v1.3/subscriptions [POST]
Traceback (most recent call last):
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\flask\app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\flask\app.py", line 919, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\flask\app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\flask\app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\nmostesting\mocks\Registry.py", line 673, in post_subscription
subscription, created = registry.subscribe_to_query_api(version, subscription_request, secure)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\nmostesting\mocks\Registry.py", line 224, in subscribe_to_query_api
websocket_server = SubscriptionWebsocketWorker('0.0.0.0', websocket_port, resource_type, secure)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\nmostesting\TestHelper.py", line 514, in __init__
self._ws_server = self._loop.run_until_complete(websockets.serve(self.handler, host, port, ssl=ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\websockets\asyncio\server.py", line 743, in __init__
self.server = Server(
^^^^^^^
File "D:\3rdparty\nmos\nmos-testing-master\.nmostest\Lib\site-packages\websockets\asyncio\server.py", line 284, in __init__
self.loop = asyncio.get_running_loop()
^^^^^^^^^^^^^^^^^^^^^^^^^^
Metadata
Metadata
Assignees
Labels
No labels
Activity
jonathan-r-thorpe commentedon Apr 28, 2025
Hi,
Is that the complete error traceback? I would expect to see the actual error at the end, whereas this traceback is only indicating the location.
Also it's worth knowing which versions of Python, Windows etc.
thebit70-ui commentedon Jan 31, 2026
I have the same issue on 2 different PC Systems. One of them is an older System with Win 10 Pro and python 3.14.2 and the following log excerpt is from a System with Win 11 Pro 25H2 and Python 3.13.9 (installed from Microsoft Store) and Riedel Nmos Explorer 1.15.1. The Error occurs if i want to connect the Riedel Nmos Explorer withe the static IP/Port data from the facade Page. In the Nmos Explorer i get an error popup
"failed to connect to :5102. No response from server. Wrong ip/port?
[2026-01-31 21:32:00,384] ERROR in app: Exception on /x-nmos/query/v1.3/subscriptions [POST] Traceback (most recent call last): File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\flask\app.py", line 1511, in wsgi_app response = self.full_dispatch_request() File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\flask\app.py", line 919, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) ~^^^^^^^^^^^^^^^^^ File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\flask\app.py", line 917, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\flask\app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "F:\nmos\nmos-testing-master\nmostesting\mocks\Registry.py", line 340, in wrapper return func(*args, **kwargs) File "F:\nmos\nmos-testing-master\nmostesting\mocks\Registry.py", line 628, in post_subscription subscription, created = registry.subscribe_to_query_api(version, subscription_request, secure) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\nmos\nmos-testing-master\nmostesting\mocks\Registry.py", line 214, in subscribe_to_query_api websocket_server = SubscriptionWebsocketWorker('0.0.0.0', websocket_port, resource_type, secure) File "F:\nmos\nmos-testing-master\nmostesting\TestHelper.py", line 531, in __init__ self._ws_server = self._loop.run_until_complete(websockets.serve(self.handler, host, port, ssl=ctx)) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\websockets\asyncio\server.py", line 759, in __init__ self.server = Server( ~~~~~~^ handler, ^^^^^^^^ ...<4 lines>... logger=logger, ^^^^^^^^^^^^^^ ) ^ File "C:\Users\ReneS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\websockets\asyncio\server.py", line 284, in __init__ self.loop = asyncio.get_running_loop() ~~~~~~~~~~~~~~~~~~~~~~~~^^ RuntimeError: no running event loopIf i paste the link in a browser i get this in the browsertab:
["devices/", "flows/", "nodes/", "receivers/", "senders/", "sources/", "subscriptions/"]jonathan-r-thorpe commentedon Feb 2, 2026
It looks like there's been in a breaking change in the Python 13
websockets.asyncioimplementation, which will need addressing.In the mean time, you could try either:
pip install websockets==12.0thebit70-ui commentedon Feb 2, 2026
Thanks for your answer.
First try was replacing python 3.13.9 with version 3.12.7 Result: Same issue. Then i'he downgraded the websocket library to version 12.0 Result: now it works.
Now I hope that the downgrades won't cause problems with other Python projects.
Best Regards
René