Ok, I solved it with the unvaluable help of a nice guy in the #python channel. It is a studid as it gets, replaced files = [('fileupload', 'b.jpg', open('b.jpg').read())] by files = [('fileupload', 'b.jpg', open('b.jpg', 'rb').read())] because binary files are not opened correctly in Windows XP unless you specify that they are so.