Some doubts in the documentation example

==========
the example code in documention
ζ•θŽ·

res = requests.post('http://localhost:8000/api/projects/{}/tasks/'.format(project_id), 
            headers={'Authorization': 'JWT {}'.format(token)},
            files=images,
            data={
                'options': options
            }).json()

in my code the options value error

too many values to unpack (expected 2)
TAT
How can I solve this problem

1 Like

Are you working on interfacing with NodeODM using a custom program or interface?

1 Like

yeah

can you give mo some suggestion?
I still can’t solve this problem

ok i got it , in my code i igorn list datebase Format
the code before

def _list_(image_name):
    result=[]
    for i in range (len(image_name)):
              
        model="('images', ("+"'"+str(image_name[i])+"', open('"+str(image_name[i])+"', 'rb'), 'image/jpg'))"
        result.append(model)


    return result 

the code now

def _list_(image_name):
    result=[]
    for i in range (len(image_name)):
              
        model="('images', ("+"'"+str(image_name[i])+"', open('"+str(image_name[i])+"', 'rb'), 'image/jpg'))"
        result.append(eval(model))

    return result 
1 Like