[mod_python] Potential bug with util.py or mpservlet and upload

Vinj Vinj vinjvinj at yahoo.com
Fri Sep 3 16:19:39 EDT 2004


I get the following error when I try to upload a form
which has two files. I get this exception when I have
a file upload and the file upload variables are
specified in the query_vars or fields.

I'm currently getting the file
self.form['file'].file.read()

I'm getting this with the new util.py version from cvs
which fixes the other bug where I was getting a string
object back for file uploads. 

This took me a good part of 2 hours to figure out :-<

This seems like an important enough patch (the updated
util.py) that should warrant a new mod_python release.



  self.__load_vars()

  File
"C:\Python23\lib\site-packages\mod_python\servlet.py",
line 366, in __load_vars
    val = self.form.getfirst(name, default).strip()

  File
"C:\Python23\lib\site-packages\mod_python\util.py",
line 64, in __getattr__
    raise AttributeError, name

AttributeError: strip



More information about the Mod_python mailing list