On Thu, 28 Apr 2005 15:45:50 +1200 Thomas wrote: T> d = [ ('cmd', 'add-item'), T> ('protocol_version', '2.1'), T> ('userfile', open(FILE)), T> ] T> req = urllib2.Request(URL, d) [...] T> TypeError: sendall() argument 1 must be string or read-only buffer, T> not list
Exactly as error message states: the second argument to Request must be string, not list. You have to encode the body manually. T> Tried the script from T> http://fabien.seisen.org/python/urllib2_multipart.html T> also T> Getting similar error.. Are you sure you imported urllib2_file? -- Denis S. Otkidach http://www.python.ru/ [ru] -- http://mail.python.org/mailman/listinfo/python-list