thingsboard-python-rest-client icon indicating copy to clipboard operation
thingsboard-python-rest-client copied to clipboard

"change_owner_to_customer" method doesn't work

Open SusannaAita opened this issue 1 year ago • 0 comments

Hello,

The method "change_owner_to_customer" that was working perfectly some months ago, is now throwing this error:

JSON parse error: Cannot deserialize value of type [Ljava.lang.String; from Object value (token JsonToken.START_OBJECT); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type [Ljava.lang.String; from Object value (token JsonToken.START_OBJECT)
at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 1]

Do you have any suggestions on how to make it work?

This is how I call it in my script:

owner= UserId(customer_id, entity_type="USER") device = EntityId(device_id, entity_type="DEVICE")

rest_client.change_owner_to_tenant(owner, device)

Thank you!!

SusannaAita avatar Jul 16 '24 14:07 SusannaAita