Seems to be working now - Thanks Massimo

On Dec 13, 2:07 pm, mdipierro <[email protected]> wrote:
> Thank you Brian, for letting me know. I think I fixed it now. Can you
> give it a try?
>
> Massimo
>
> On Dec 13, 1:26 pm, Brian M <[email protected]> wrote:
>
> > Odd, now with rev 25 I'm getting an error message when trying to
> > upload an app.
>
> > Traceback (most recent call last):
> >   File "C:\...\web2py\gluon\main.py", line 436, in wsgibase
> >     parse_get_post_vars(request, environ)
> >   File "C:\...\web2py\gluon\main.py", line 308, in parse_get_post_vars
> >     if len(pvalue):
> >   File "C:\Python26\lib\cgi.py", line 600, in __len__
> >     return len(self.keys())
> >   File "C:\Python26\lib\cgi.py", line 583, in keys
> >     raise TypeError, "not indexable"
> > TypeError: not indexable
>
> > I managed to get it working again with the following modification to
> > gluon/main.py
>
> > diff --git a/gluon/main.py b/gluon/main.py
> > --- a/gluon/main.py
> > +++ b/gluon/main.py
> > @@ -305,8 +305,11 @@
> >                  else:
> >                      pvalue = listify(value)[:-len(listify
> > (request.get_vars[key]))]
> >              request.vars[key] = value
> > -            if len(pvalue):
> > -                request.post_vars[key] = (len(pvalue)>1 and pvalue)
> > or pvalue[0]
> > +            try:
> > +                if len(pvalue):
> > +                    request.post_vars[key] = (len(pvalue)>1 and
> > pvalue) or pvalue[0]
> > +            except:
> > +                request.post_vars[key] = pvalue
>
> >  def wsgibase(environ, responder):
> >      """
>
> > Quick testing shows that I can again successfully upload an app.
>
> > ~Brian
>
> > On Dec 12, 9:25 am, mdipierro <[email protected]> wrote:
>
> > > Thanks. I will fix this in trunk. As usual this is because of a new
> > > feature introduced in 10.
>
> > > On Dec 11, 9:40 pm, DenesL <[email protected]> wrote:
>
> > > > w2p files created with changeset 10 give this error on upload (also
> > > > running changeset 10):
>
> > > > Traceback (most recent call last):
> > > >   File "C:\web2py\hg\gluon\main.py", line 436, in wsgibase
> > > >     parse_get_post_vars(request, environ)
> > > >   File "C:\web2py\hg\gluon\main.py", line 308, in parse_get_post_vars
> > > >     ifpvalue:
> > > >   File "C:\Python25\lib\cgi.py", line 633, in __len__
> > > >     return len(self.keys())
> > > >   File "C:\Python25\lib\cgi.py", line 609, in keys
> > > >     raise TypeError, "not indexable"
> > > > TypeError: not indexable

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to