There are two issues here:

1) cgi.FieldStorage behaves differently between 2.5 and 2.6. There is
NO WAY around this problem. For example if the request.get_vars
contain {'x', 'y'} and the request.post_vars contain {'x': ['y','z']}
does it mean that x=y is in the body of the POST or that python is
incorrectly picking it from the GET vars? No way of knowing without
checking the Python version and I do not know for sure which version
have this bug and which don't. The fact is, one should not mix get and
post vars!

2) appadmin works for me. I cannot reproduce ctalley's problem. My
guess is that appadmin was modified to cope with this issue (i vaguely
remember so) and he is using an older appadmin. I suggest he copies
appadmin.py and appadmin.html from a recent web2py welcome app and see
if the problem persists.

Massimo


On Aug 24, 2:44 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
> On Aug 24, 2009, at 12:26 PM, ctalley wrote:
>
>
>
> > I'm running 2.6.2.  My decision to go with python 2.6 was based on the
> > following from the web2py site...
>
> >http://www.web2py.com/examples/default/index
>
> > "Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and
> > almost any web hosting via Python 2.4/2.5/2.6, or Java with Jython."
>
> > Perhaps that should be changed.
>
> > I guess I now have to downgrade to 2.5.4.
>
> There must be some better solution, Massimo. Not being 2.6-compatible  
> just doesn't cut it.
>
>
>
> > On Aug 24, 3:12 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> >> This is an example of an incompatibility between the CGI module in  
> >> 2.5
> >> and 2.6. That is why we only support 2.5 "officially".
>
> >> It was discussed previously on this list. Which version of 2.6? 2.6.1
> >> or 2.6.2?
>
> >> Massimo
>
> >> On Aug 24, 2:04 pm, ctalley <ctal...@caci.com> wrote:
>
> >>> using web2py version 1.66.0 source
> >>> and python 2.6
>
> >>> from this page...http://127.0.0.1:8000/mydb/appadmin/index
>
> >>> click a table link such as db.mytable
>
> >>> lists query => db.mytable.id>0, and rows in table -- all is well :-)
>
> >>> now, still on the same page, click Submit; should just reload the  
> >>> page
> >>> with the same information (right?)
>
> >>> but instead, this happens...
>
> >>> Traceback (most recent call last):
>
> >>> File "C:\...\gluon\restricted.py", line 178, in restricted exec  
> >>> ccode
> >>> in environment
>
> >>> File "C:/.../applications/mydb/controllers/appadmin.py", line 281,  
> >>> in
> >>> <module>
>
> >>> File "C:\...\gluon\globals.py", line 101, in <lambda> self._caller =
> >>> lambda f: f()
>
> >>> File "C:/.../applications/mydb/controllers/appadmin.py", line 168,  
> >>> in
> >>> select match = regex.match(request.vars.query)
>
> >>> TypeError: expected string or buffer
>
> >>> What I was really trying to do was delete some rows; that also  
> >>> doesn't
> >>> work - same error.- Hide quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to