question about posting data using MultipartPostHandler

Chris Angelico rosuav at gmail.com
Thu Aug 15 20:45:03 EDT 2013


On Thu, Aug 15, 2013 at 7:12 PM, cerr <ron.eggler at gmail.com> wrote:
>         multipart = ({"data":data}, {"fname":fname}, {"f":f})
>
> but I get an error saying "'tuple' object has no attribute 'items'"... how do I do this correctly?

You're no longer providing a dictionary, but a tuple of dictionaries.
What you want to do is use a single dictionary:

multipart = {"data":data, "fname":fname, "f":f}

That should achieve what you want.

ChrisA



More information about the Python-list mailing list