Closed darshanjain12 closed 1 year ago
Particularly this error "Pub Sub subscription failed with error: 'str' object has no attribute 'get'
Hi @darshanjain12 can you provide the command you used that gave you this error?
@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.
Not getting the exact payload thread getting the error in middle of telemetry validation. Please suggest. Attached the screenshot
Thank you for guiding me through the process. Found out that one of the device was actually passing timestamp in place of present value.
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