google / digitalbuildings

Digital Buildings (ontology and SDK) currently being used by Google internally to manage our own buildings.
Apache License 2.0
371 stars 137 forks source link

[FACING ISSUE WITH VALIDATOR ON LINUX MACHINE] #841

Closed darshanjain12 closed 1 year ago

darshanjain12 commented 1 year ago

Faced issue while running validator. The validator was working fine but abruptly started giving this error. Please help with the same.

Top-level exception occurred in callback while processing a message Traceback (most recent call last): File "/home/DBO/digitalbuildings/tools/tooling/lib/python3.10/site-packages/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py", line 126, in _wrap_callback_errors callback(message) File "/home/DBO/digitalbuildings/tools/tooling/lib/python3.10/site-packages/validate/telemetry_validator.py", line 125, in ValidateMessage tele = telemetry.Telemetry(message) File "/home/DBO/digitalbuildings/tools/tooling/lib/python3.10/site-packages/validate/telemetry.py", line 58, in init self._parse_data(message.data)) File "/home/DBO/digitalbuildings/tools/tooling/lib/python3.10/site-packages/validate/telemetry.py", line 135, in _parse_data p = point.Point(point_name, value.get(PRESENT_VALUE)) AttributeError: 'str' object has no attribute 'get'

Thanks & Regards, Darshan Jain

darshanjain12 commented 1 year ago

Particularly this error "Pub Sub subscription failed with error: 'str' object has no attribute 'get'

trav3711 commented 1 year ago

Hi @darshanjain12 can you provide the command you used that gave you this error?

tasodorff commented 1 year ago

@darshanjain12 as discussed today, please look at the payload being sent prior to this error arising (it should print to console). the error appears to be a malformed payload, where the validator is expecting a key:value pair, but is instead getting a lone string. please rerun and ensure the payload looks correct.

if you are still having trouble, please paste the payload into this thread and we can take a look.

darshanjain12 commented 1 year ago

Not getting the exact payload thread getting the error in middle of telemetry validation. Please suggest. Attached the screenshot

Screenshot from 2022-11-23 19-50-11

darshanjain12 commented 1 year ago

Thank you for guiding me through the process. Found out that one of the device was actually passing timestamp in place of present value.