-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The test suite is failing
The function blocks may use MQTT client for communication. These cases are resulting in errors.
```ps1
python .\src\examples\example.py sysid-and-publish
JSON configuration loaded successfully.
on_connect: Connected with response code Success
Subscribing to topic: sensors/1/acc/raw/metadata
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 0')]
Extracted Fs from metadata: 256.0
Extracted FS from metadata: 256.0
JSON configuration loaded successfully.
Failed to extract FS from metadata. Using DEFAULT_FS.
on_connect: Connected with response code Success
Subscribing to topic: sensors/1/acc/raw/data
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_subscribe: Subscription ID 2 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 3 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 4 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 5 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 6 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 7 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 8 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
Waiting for data for 12.0 seconds
Aligned shape: (4, 3072)
Data dimensions: (3072, 4)
sysid parameters: {'freq_variance_treshold': 0.1, 'damp_variance_treshold': 1000000, 'Fs': 256, 'model_order_min': 2, 'model_order': 15, 'block_shift': 30, 'sensor_order': array([0, 2, 1, 3]), 'mstab': 6, 'tMAC': 0.95, 'bound_multiplier': 2, 'allignment_factor': [0.05, 0.01], 'phi_cri': 0.8, 'freq_cri': 0.2, 'obj_cri': 0.1}
2025-11-09 10:22:32,994 - pyoma2.setup.base - INFO - Running SSIcovmm_mt... (base:123)
2025-11-09 10:22:32,994 - pyoma2.functions.ssi - INFO - Assembling Hankel matrix method: cov_mm... (ssi:82)
2025-11-09 10:22:33,002 - pyoma2.functions.ssi - INFO - ... uncertainty calculations... (ssi:94)
2025-11-09 10:22:33,010 - pyoma2.functions.ssi - INFO - SSI for increasing model order... (ssi:359)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<?, ?it/s]
2025-11-09 10:22:33,026 - pyoma2.functions.ssi - INFO - Calculating uncertainty... (ssi:367)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 42.49it/s]
2025-11-09 10:22:33,379 - pyoma2.functions.ssi - INFO - Calculating modal parameters... (ssi:531)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 517.59it/s]
Timestamp: 2025-11-09 10:22:32.990149
Publisher disconnected. Reconnecting...
[2025-11-09T10:22:32.990149] Published sysid result to sensors/1/acc/sysid/data
Publishing to topic: sensors/1/acc/sysid/datapython .\src\examples\example.py live-sysid-publish
JSON configuration loaded successfully.
on_connect: Connected with response code Success
Subscribing to topic: sensors/1/acc/raw/metadata
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 0')]
Extracted Fs from metadata: 256.0
Extracted FS from metadata: 256.0
JSON configuration loaded successfully.
Failed to extract FS from metadata. Using DEFAULT_FS.
on_connect: Connected with response code Success
Subscribing to topic: sensors/1/acc/raw/data
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_subscribe: Subscription ID 2 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 3 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 4 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 5 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 6 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 7 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_subscribe: Subscription ID 8 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
Waiting for data for 60.1 seconds
Aligned shape: (4, 15360)
Data dimensions: (15360, 4)
sysid parameters: {'freq_variance_treshold': 0.1, 'damp_variance_treshold': 1000000, 'Fs': 256, 'model_order_min': 2, 'model_order': 15, 'block_shift': 30, 'sensor_order': array([0, 2, 1, 3]), 'mstab': 6, 'tMAC': 0.95, 'bound_multiplier': 2, 'allignment_factor': [0.05, 0.01], 'phi_cri': 0.8, 'freq_cri': 0.2, 'obj_cri': 0.1}
2025-11-09 10:26:29,146 - pyoma2.setup.base - INFO - Running SSIcovmm_mt... (base:123)
2025-11-09 10:26:29,146 - pyoma2.functions.ssi - INFO - Assembling Hankel matrix method: cov_mm... (ssi:82)
2025-11-09 10:26:29,190 - pyoma2.functions.ssi - INFO - ... uncertainty calculations... (ssi:94)
2025-11-09 10:26:29,337 - pyoma2.functions.ssi - INFO - SSI for increasing model order... (ssi:359)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<?, ?it/s]
2025-11-09 10:26:29,361 - pyoma2.functions.ssi - INFO - Calculating uncertainty... (ssi:367)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:02<00:00, 7.46it/s]
2025-11-09 10:26:31,370 - pyoma2.functions.ssi - INFO - Calculating modal parameters... (ssi:531)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 82.85it/s]
Timestamp: 2025-11-09 10:26:29.080731
Publisher disconnected. Reconnecting...
[2025-11-09T10:26:29.080731] Published sysid result to sensors/1/acc/sysid/data
Publishing to topic: sensors/1/acc/sysid/data
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
Waiting for data for 57.4 seconds
Aligned shape: (4, 15360)
Data dimensions: (15360, 4)
sysid parameters: {'freq_variance_treshold': 0.1, 'damp_variance_treshold': 1000000, 'Fs': 256, 'model_order_min': 2, 'model_order': 15, 'block_shift': 30, 'sensor_order': array([0, 2, 1, 3]), 'mstab': 6, 'tMAC': 0.95, 'bound_multiplier': 2, 'allignment_factor': [0.05, 0.01], 'phi_cri': 0.8, 'freq_cri': 0.2, 'obj_cri': 0.1}
2025-11-09 10:27:29,163 - pyoma2.setup.base - INFO - Running SSIcovmm_mt... (base:123)
2025-11-09 10:27:29,163 - pyoma2.functions.ssi - INFO - Assembling Hankel matrix method: cov_mm... (ssi:82)
2025-11-09 10:27:29,198 - pyoma2.functions.ssi - INFO - ... uncertainty calculations... (ssi:94)
2025-11-09 10:27:29,295 - pyoma2.functions.ssi - INFO - SSI for increasing model order... (ssi:359)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<?, ?it/s]
2025-11-09 10:27:29,295 - pyoma2.functions.ssi - INFO - Calculating uncertainty... (ssi:367)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:01<00:00, 8.13it/s]
2025-11-09 10:27:31,148 - pyoma2.functions.ssi - INFO - Calculating modal parameters... (ssi:531)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 184.72it/s]
Timestamp: 2025-11-09 10:27:29.131299
Publisher disconnected. Reconnecting...
[2025-11-09T10:27:29.131299] Published sysid result to sensors/1/acc/sysid/data
Publishing to topic: sensors/1/acc/sysid/data
on_connect: Connected with response code Not authorized
Connection failed with result code: Not authorized
Waiting for data for 57.8 seconds
Aligned shape: (4, 15360)
Data dimensions: (15360, 4)
sysid parameters: {'freq_variance_treshold': 0.1, 'damp_variance_treshold': 1000000, 'Fs': 256, 'model_order_min': 2, 'model_order': 15, 'block_shift': 30, 'sensor_order': array([0, 2, 1, 3]), 'mstab': 6, 'tMAC': 0.95, 'bound_multiplier': 2, 'allignment_factor': [0.05, 0.01], 'phi_cri': 0.8, 'freq_cri': 0.2, 'obj_cri': 0.1}
2025-11-09 10:28:29,107 - pyoma2.setup.base - INFO - Running SSIcovmm_mt... (base:123)
2025-11-09 10:28:29,107 - pyoma2.functions.ssi - INFO - Assembling Hankel matrix method: cov_mm... (ssi:82)
2025-11-09 10:28:29,142 - pyoma2.functions.ssi - INFO - ... uncertainty calculations... (ssi:94)
2025-11-09 10:28:29,221 - pyoma2.functions.ssi - INFO - SSI for increasing model order... (ssi:359)
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<00:00, 2036.69it/s]
2025-11-09 10:28:29,229 - pyoma2.functions.ssi - INFO - Calculating uncertainty... (ssi:367)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:01<00:00, 8.90it/s]
2025-11-09 10:28:30,915 - pyoma2.functions.ssi - INFO - Calculating modal parameters... (ssi:531)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 111.83it/s]
Timestamp: 2025-11-09 10:28:29.080388
Publisher disconnected. Reconnecting...
[2025-11-09T10:28:29.080388] Published sysid result to sensors/1/acc/sysid/data
Publishing to topic: sensors/1/acc/sysid/datapython .\src\examples\example.py clustering-with-remote-sysid
JSON configuration loaded successfully.
Waiting for sysid data...
Connected to MQTT broker.
Subscribed to topic: sensors/1/acc/sysid/data
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 0')]
Message received on topic: sensors/1/acc/sysid/data
Received sysid data at timestamp: 2025-11-09T11:50:05.126700
sysid data received. Running mode clustering and tracking...
Unexpected error: exceptions must derive from BaseException
Traceback (most recent call last):
File "C:\foo\example-shm\src\examples\example.py", line 105, in <module>
cli(obj={})
File "C:\foo\example-shm\.venv\Lib\site-packages\click\core.py", line 1462, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\.venv\Lib\site-packages\click\core.py", line 1383, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\.venv\Lib\site-packages\click\core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\.venv\Lib\site-packages\click\core.py", line 1246, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\.venv\Lib\site-packages\click\core.py", line 814, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\.venv\Lib\site-packages\click\decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\src\examples\example.py", line 72, in clustering_with_remote_sysid
run_mode_clustering_with_remote_sysid(ctx.obj["CONFIG"])
File "C:\foo\example-shm\src\examples\run_mode_clustering.py", line 47, in run_mode_clustering_with_remote_sysid
sysid_output, dictionary_of_clusters, meadian_frequencies = MC.subscribe_and_cluster(config_path,PARAMS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\foo\example-shm\src\methods\mode_clustering.py", line 121, in subscribe_and_cluster
return sysid_output_global, clusters, median_frequencies
^^^^^^^^
UnboundLocalError: cannot access local variable 'clusters' where it is not associated with a valueMetadata
Metadata
Assignees
Labels
No labels