May be a bug. I will check. Massimo
On May 24, 11:41 am, selecta <gr...@delarue-berlin.de> wrote: > I am trying to customize auth with > > auth_table = db.define_table( auth.settings.table_user_name, > Field('first_name', length=128, default='',requires = > IS_NOT_EMPTY(error_message=auth.messages.is_empty)), > Field('last_name', length=128, default='',requires = > IS_NOT_EMPTY(error_message=auth.messages.is_empty)), > Field('email', length=128, default='', unique=True,requires = > [ IS_EMAIL(error_message=auth.messages.invalid_email), > IS_NOT_IN_DB(db, auth.settings.table_user_name+".email")]), > #Field('password', 'password', length=256, readable=False, > label='Password',requires = [IS_STRONG(), CRYPT()]), > Field('password', 'password', length=256, readable=False, > label='Password',requires = CRYPT()), > Field('registration_key', length=128, default= '', > writable=False, readable=False), > Field('skype'), > Field('tel', requires = IS_EMPTY_OR(IS_MATCH('^\+\d{2} \d+ \d+ > $', error_message='telephone number format: +XX XX* XXXXXX*'))), > Field('fax', requires = IS_EMPTY_OR(IS_MATCH('^\+\d{2} \d+ \d+ > $', error_message='faxnumber number format: +XX XX* XXXXXX*'))), > Field('avatar', 'upload', requires = IS_IMAGE(), label = "Your > Picture") > ) > > but when I upload an image I get > > Traceback (most recent call last): > File "/home/select/Dev/web2py/gluon/main.py", line 407, in wsgibase > session._try_store_on_disk(request, response) > File "/home/select/Dev/web2py/gluon/globals.py", line 375, in > _try_store_on_disk > cPickle.dump(dict(self), response.session_file) > File "/usr/lib/python2.6/copy_reg.py", line 70, in _reduce_ex > raise TypeError, "can't pickle %s objects" % base.__name__ > TypeError: can't pickle file objects > > I think I saw an answer for that some time ago, but I cannot find it > would it be possible to modify the session so it does not try to store > upload fields from auth?