Api Permissions - Error while posting with Python3

Donald5 years ago

Hi,

Some time ago i decided to move my project from python2 to python3. Most of my scripts worked fine but For some reason the the function responsible for linking a device to user throw the following Error in python3:

No value specified for parameter 2 - SQLException (... < QueryBuilder:480 < DataManager:441 < PermissionsResource:63 < ...)

My code:

def assign_Device2User(self,UserID,deviceID):

        path = self._urls['permissions']

        data = {

        "deviceId": deviceID,
        "userId": UserID

        }
       
        
        req = self._session.post(url=path, json=data)

I tried to change the data format to list of dictionaries but that also didn't work.( Cannot deserialize instance of java.util.LinkedHashMap out of START_ARRAY token)