I cannot reproduce the problem and I do not understand how it is possible 
that #2 is executed (with an error) but #1 is not (code below). I believe 
this is happening to you but I need your help figuring out why. I need to 
understand which is/elif are true in that code and what is the value of f 
when the faulty line is executed. Do you get any console output at all? How 
about if you add other print statements in the code?

elif field.type == 'upload':
    f = self.vars[fieldname]
    print f #<<<<<<<<< #1
    fd = '%s__delete' % fieldname
    ...
    newfilename = field.store(source_file, original_filename, 
field.uploadfolder) #<<<<<<#2



On Friday, 27 July 2012 00:21:42 UTC-5, Annet wrote:
>
> Massimo,
>
> elif field.type == 'upload':
>     f = self.vars[fieldname]
>     print f
>     fd = '%s__delete' % fieldname
>     ...
>     newfilename = field.store(source_file, original_filename, 
> field.uploadfolder)
>
> When I submit the form with the upload field left empty, nothing is being 
> written to the shell.
>
> I also tried adding print 'myName', but that isn't being written to the 
> shell either, not even when
> I make it the first statement in the accepts function.
>
> The first time 'myName' is written to the shell is when I add the print 
> statement in appadmin.py
> at line 128 right after form = SQLFORM(db[table], ignore_rw=ignore_rw)
>
> What else can I do to help you debug this issue?
>
>
> Annet.
>

-- 



Reply via email to