Using API to import from Python - Xibo 2.2.1

I’m running a Python script to import csv file to dataset. When I view dataset it shows heading and rows but row data is empty. I’m doing a GET to find dataSetColumnId and it does return value which I then use in the POST which in my case I’m using the following statement in Python for encoding:

encoder = MultipartEncoder({
    'datasetid':"2",
    'files':(basename, open(filename, 'rb'), mimetype),
     'csvimport_7':"1",
     'csvimport_8':"2",
    'overwrite':"1",
    'ignorefirstrow':"1"
})

If I do a manual import it works. When I do the POST in Python it does skip first record and does overwrite file and does create rows so doing everything except filling the column data. Not sure what else to try. Thanks

Hi and welcome!

try (note the capital letter):

Thanks,
Dan

That fixed my issue. Thank you so much for the quick response.

1 Like
The Xibo Community site uses cookies. What are cookies?