web2py 1.95.1 and open issues

165 views
Skip to first unread message

Massimo Di Pierro

unread,
Apr 25, 2011, 10:06:10 AM4/25/11
to web2py-users
Hello everybody,

web2py 1.95.1 is out with lots of improvements and bug fixes:
## 1.95.1
- Google MySQL support (experimental)
- pip support, thanks lifeeth
- better setup_exe.py, thanks meredyk
- importved pyfpdf
- domain check in email_auth.py, thanks Gyuris
- added change_password_onvalidation and change_password_onaccept
- DAL(...,migrate_enabled=True)
- login_methods/loginza.py, thanks Vladimir
- bpython shell support, thanks Arun
- request.uuid and response.uuid (for a future toolbar)
- db._timings contains database query timing info
- efficient db(...).isempty()
- setup-web2py-nginx-uwsgi-ubuntu.sh
- Many bug fixes, thanks Jonathan

Please check it out.

I have many pending patches still to be applied and tested:
- those documented in googlecode issues
- the new custom_import

Is there any outstanding issue that has not been submitted as an issue to googlecode?

Massimo


Stifan Kristi

unread,
Apr 25, 2011, 10:19:36 AM4/25/11
to web...@googlegroups.com
great job, massimo n the others, i've download n test it. thank you so much.

Praneeth Bodduluri

unread,
Apr 25, 2011, 10:33:58 AM4/25/11
to web...@googlegroups.com
Also available at the cheese shop

To install:

pip install web2py


To upgrade:

pip install web2py --upgrade


--
Praneeth
IRC: lifeeth

Vasile Ermicioi

unread,
Apr 25, 2011, 10:37:27 AM4/25/11
to web...@googlegroups.com
hi,

thank you Massimo, 

please tell us more about  Google MySQL

does it support GROUP BY and JOINs ?

I need to know that for a library I am working on...

Massimo Di Pierro

unread,
Apr 25, 2011, 10:52:32 AM4/25/11
to web2py-users
I cannot tell you much because Google has not yet released the service
publicly. I can tell you I have tested it (they gave me early access
for the test) and it supports normal mysql syntax including GROUP BY,
JOINs, transactions and web2py automatic migrations.

We should just call it GoogleSQL since although the syntax is MySQL
compatible, I do not think is exactly MySQL under the hood.

I will post instructions as soon as they go public with this.
Basically we will be able to deploy on GAE any web2py app without ANY
change. Additionally we will be able to use GoogleSQL for some tables
and GoogleNoSQL for other tables at the same time, in the same app.

Massimo

Gilson Filho

unread,
Apr 25, 2011, 11:01:10 AM4/25/11
to web...@googlegroups.com
I was wondering if in future versions, will have support for models and controllers in subfolders. For example:

+-models
+--model01
+--------model01.py
+--model02.py
+--model03.py
_____________________________________________
Gilson Filho
Web Developer
http://gilsondev.com



2011/4/25 Massimo Di Pierro <massimo....@gmail.com>

Massimo Di Pierro

unread,
Apr 25, 2011, 11:08:31 AM4/25/11
to web2py-users
this has been discussed and I support it. We just have to agree on the
exact syntax since we want to allow dependencies in non-alphabetical
order and conditional execution.

On Apr 25, 10:01 am, Gilson Filho <cont...@gilsondev.com> wrote:
> I was wondering if in future versions, will have support for models and
> controllers in subfolders. For example:
>
> +-models
> +--model01
> +--------model01.py
> +--model02.py
> +--model03.py
> _____________________________________________
> *Gilson Filho*
> *Web Developerhttp://gilsondev.com*
>
> 2011/4/25 Massimo Di Pierro <massimo.dipie...@gmail.com>

Kenneth Lundström

unread,
Apr 25, 2011, 11:35:55 AM4/25/11
to web...@googlegroups.com
> - importved pyfpdf

Is there any more info about the improved pyfpdf?


Kenneth

Massimo Di Pierro

unread,
Apr 25, 2011, 1:10:54 PM4/25/11
to web2py-users
Look up the pyfpdf project on google code. I upgraded on March 30.

On Apr 25, 10:35 am, Kenneth Lundström <kenneth.t.lundst...@gmail.com>
wrote:

Oscar

unread,
Apr 26, 2011, 2:18:15 AM4/26/11
to web...@googlegroups.com
I upgraded to this version, then plugin_wiki is broken, it return an error at menu.py sating that attribute str has not xml method.

Oscar.

Massimo Di Pierro

unread,
Apr 26, 2011, 8:25:00 AM4/26/11
to web2py-users
In you menu you have...

URL(...).xml() but should be URL(...) without .xml().

Oscar

unread,
Apr 26, 2011, 9:05:49 AM4/26/11
to web2py-users
Why happened it?

Did you changed some thing in the last update?

Thank you,

Oscar.


On 26 abr, 08:25, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:

Oscar

unread,
Apr 26, 2011, 9:08:19 AM4/26/11
to web2py-users
That solved the issue :-)

I removed .xml from every "URL" object in that line.

Oscar.


On 26 abr, 08:25, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:

Anthony

unread,
Apr 26, 2011, 9:23:46 AM4/26/11
to web...@googlegroups.com
On Tuesday, April 26, 2011 9:05:49 AM UTC-4, Oscar wrote:
Why happened it?

Did you changed some thing in the last update?
 
Back in September, URL was changed to return an XML object, giving it an xml() method (see http://code.google.com/p/web2py/source/detail?r=f1b6270440724180964c385789125b7c0baaab0e&path=/gluon/html.py). However, that created a bug whereby URL query strings were not being properly escaped, so the change was recently reverted (see http://code.google.com/p/web2py/source/detail?r=7f8433889c2ec409b721783f0159a77d83153d0b). So, there's no more xml() method.
 
Anthony

Iceberg

unread,
Apr 27, 2011, 7:33:36 AM4/27/11
to web2py-users
On Apr 25, 10:06 pm, Massimo Di Pierro <mdipie...@cs.depaul.edu>
wrote:
> Hello everybody,
>
> web2py 1.95.1 is out with lots of improvements and bug fixes:
> - ......
>
> Please check it out.
>
> I have many pending patches still to be applied and tested:
> - those documented in googlecode issues
> - the new custom_import
>
> Is there any outstanding issue that has not been submitted as an issue to googlecode?
>
> Massimo


Nice job. I start using it now, so far so good.

But seems the latest suggestion for issue 221 is not in yet?
http://code.google.com/p/web2py/issues/detail?id=221

Regards,
Iceberg

toan75

unread,
Apr 27, 2011, 8:17:20 AM4/27/11
to web...@googlegroups.com
Hi,
In new version: crud.update work only with deletable=False?

Massimo Di Pierro

unread,
Apr 27, 2011, 8:21:41 AM4/27/11
to web2py-users
I do not think so. It was not touched. Can you provide an example of
the problem?

toan75

unread,
Apr 27, 2011, 9:34:57 PM4/27/11
to web...@googlegroups.com
I have this error when set deletable=True:

  File "E:\web2py\gluon\globals.py", line 133, in <lambda>
self._caller = lambda f: f()
File "E:\web2py\gluon\tools.py", line 2335, in f
return action(*a, **b)
File "E:/web2py/applications/init/controllers/plugin_admin.py", line 142, in update
if form.accepts(request.vars, session):
File "E:\web2py\gluon\sqlhtml.py", line 1200, in accepts
self.table._db(self.table.id == self.record.id).update(**fields)
File "E:\web2py\gluon\dal.py", line 5173, in update
fields = self.db[tablename]._listify(update_fields,update=True)
File "E:\web2py\gluon\dal.py", line 4464, in _listify
raise SyntaxError, 'Field %s does not belong to the table' % name
SyntaxError: Field delete_this_record does not belong to the table

toan75

unread,
Apr 27, 2011, 9:54:04 PM4/27/11
to web...@googlegroups.com
My controller:

def crud1():
    form = crud.update(db.container,request.args(0),deletable=True)
    if form.accepts(request.vars, session):
        pass
    return dict(form=form)

I have web2py 1.95.1, Python 2.7 & OS Win7 Home

Massimo Di Pierro

unread,
Apr 27, 2011, 11:52:21 PM4/27/11
to web2py-users
Can you help me debug this?

Do you get the error when you check the "delete" box or when you do
not?

In line 1093 of gluon/sqlhtml.py

can you change

if requested_delete and self.custom.deletable

into

if requested_delete and self.custom.deletable!=''

do you still get the error below?

toan75

unread,
Apr 28, 2011, 3:00:55 AM4/28/11
to web...@googlegroups.com
I get only the error when not check the "delete" box.
And not error when remove :
if form.accepts(request.vars, session):
        pass
I change in line 1093 of gluon/sqlhtml.py, but not work.


selecta

unread,
Apr 28, 2011, 5:06:23 AM4/28/11
to web2py-users
I get an unkown error for every ticket that is created by my
application
I can see the print out of the error trackeback in the shell i started
web2py in
also the ticked pickle files are broken, when i open the admin to view
the tickets i get
Traceback (most recent call last):
File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/restricted.py",
line 181, in restricted
exec ccode in environment
File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
controllers/default.py", line 1188, in <module>
File "/home/fkrause/Downloads/tmp/wp/web2py/gluon/globals.py", line
133, in <lambda>
self._caller = lambda f: f()
File "/home/fkrause/Downloads/tmp/wp/web2py/applications/admin/
controllers/default.py", line 1033, in errors
error = pickle.load(open(fullpath, 'r'))
File "/usr/lib/python2.6/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.6/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/lib/python2.6/pickle.py", line 880, in load_eof
raise EOFError
EOFError

this only is the case for my older applications, i cannot reproduce it
with a newly created application

selecta

unread,
Apr 28, 2011, 5:11:10 AM4/28/11
to web2py-users
after deleting my app step by step i found it
i had

from gluon.tools import *

in one of my model files
this breaks the ticket generation!

selecta

unread,
Apr 28, 2011, 5:32:05 AM4/28/11
to web2py-users
ok this cant be correct
so i started importing things that were missing

from gluon.tools import Auth #ok
from gluon.tools import Crud #ok
from gluon.tools import Service #ok
from gluon.tools import Mail<-here it starts creating corrupt error
tickets again

selecta

unread,
Apr 28, 2011, 6:31:52 AM4/28/11
to web2py-users
in a fresh mercurial checkout i commented out
jn = os.path.join in one of my models and the error messages were
normal again

in version 1.95.1 i commented out #mail = Mail()
and i had normal error messges again, complaining that mail is unknow
so i changed
auth.settings.mailer = mail
to
auth.settings.mailer = None

and the error messages are unknown again and only appear in the shell

selecta

unread,
Apr 28, 2011, 6:32:37 AM4/28/11
to web2py-users
in a fresh mercurial checkout i commented out
jn = os.path.join in one of my models and the error messages were
normal again

in version 1.95.1 i commented out #mail = Mail()
and i had normal error messges again, complaining that mail is unknow
so i changed
auth.settings.mailer = mail
to
auth.settings.mailer = None

and the error messages are unknown again and only appear in the shell
i am stumbeling in the dark, what is going on here?

On Apr 28, 11:32 am, selecta <gr...@delarue-berlin.de> wrote:

Massimo Di Pierro

unread,
Apr 28, 2011, 9:35:02 AM4/28/11
to web2py-users
Can you please add

print request.vars # <<< this line
if form.accepts(request.vars, session):
pass

and tell me what it prints if submit without checking the "delete"
box, when you would get the error?

Massimo Di Pierro

unread,
Apr 28, 2011, 9:35:44 AM4/28/11
to web2py-users
What do you mean by corrupted error tickets? Do you have a traceback?

toan75

unread,
Apr 28, 2011, 11:38:18 AM4/28/11
to web...@googlegroups.com
That print:
<Storage {'name': 'box project home', 'object': '', '_formname': 'container/800'
, 'content': '', 'div': 'midle', 'id': '800', 'position': '100', '_formkey': 'bd
2630f58397518b338e318405ef4892', 'type': 'link', 'folder': '19', '_next': ''}>

toan75

unread,
Apr 28, 2011, 11:39:14 AM4/28/11
to web...@googlegroups.com
My DB:

db.define_table('container',
    Field('folder','reference folder',requires=IS_NULL_OR(IS_IN_DB(db,'folder.id','%(name)s'))),
    Field('object','reference object',requires=IS_NULL_OR(IS_IN_DB(db,'object.id','%(name)s'))),
    Field('name',default=''),
    Field('div',default='midle',requires=IS_IN_SET(plugin_admin_setting['div'])),
    Field('position','integer',default=100),
    Field('content','text',default='<div id="div_default">{{=plugin_admin.write_object(context)}}</div>'),
    Field('active','boolean',default=True),
    Field('type',default='folder',requires=IS_IN_SET(['folder','content','link'])),
    Field('created_by','integer',default=auth.user_id or 1,writable=False,readable=False),
    Field('created_on','datetime',default=request.now,writable=False,readable=False),
    migrate=plugin_admin_setting['migrate'])

selecta

unread,
Apr 28, 2011, 1:55:26 PM4/28/11
to web2py-users
> What do you mean by corrupted error tickets? Do you have a traceback?
all I get is an unknow error, a printout in the shell and a ticket
file
if i try to access this ticket file in the appadmin i get the
traceback that i posted before

ls1

unread,
May 16, 2011, 7:46:36 AM5/16/11
to web2py-users
I confirm the problem. Had the same errors.
Solution for user: delete all non-tickets files from errors directory.
Any non-ticket file in directory generates error and links like

http://127.0.0.1:8000/admin/default/errors/<appname>

does not work.

To preserve directory structure in my application hg repository I used
to have one empty file in each directory.
Now I had to delete this file, didn't like it.
Reply all
Reply to author
Forward
0 new messages