Skip to content

unable to parse json #77

@bravehurts2

Description

@bravehurts2

sometimes there is an additional character at the end of json string. Is there a possibility to cut this before parsing? I think this was the post for the map.

unable to parse json '{"id":19017xx,"result":["https://awsbj0.fds.api.xiaomi.com/robomap/robomap%2F ..... &Signature=xxxx="]}i': Extra data: line 1 column 668 (char 667)
Headertime 2018-02-19 22:16:55 
Localtime 2018-02-19 22:16:54.576622 
----------------------------------------
Exception happened during processing of request from ('192.168.x.x', 51066)
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/var/www/html/server.py", line 396, in handle
    self.on_read_cloud()
  File "/var/www/html/server.py", line 448, in on_read_cloud
    process_result = self.Cloudi.process_cloud_data(self, data)
  File "/var/www/html/server.py", line 305, in process_cloud_data
    method = m.data.value.get("method", "NONE")
AttributeError: 'NoneType' object has no attribute 'get'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions