weird errors (probably with crud)

1 view
Skip to first unread message

Jurgis Pralgauskis

unread,
May 6, 2009, 9:12:29 AM5/6/09
to web2py Web Framework
Hello,

I renamed the application folder and started web2py again
I can do admin ok, but CRUD examples stop to work :/
not sure if this is due to renaming..

http://127.0.0.1:8000/CodeByExample/default/data/tables
shows empty window :/
I recall it showed me nice tables some time earlier..

http://127.0.0.1:8000/CodeByExample/default/data/select/Examples
I get Error

Traceback (most recent call last):
File "/home/www/web2py/gluon/restricted.py", line 98, in restricted
exec ccode in environment
File "/home/www/web2py/applications/CodeByExample/controllers/
default.py", line 18, in <module>
File "/home/www/web2py/gluon/globals.py", line 75, in <lambda>
self._caller = lambda f: f()
File "/home/www/web2py/applications/CodeByExample/controllers/
default.py", line 13, in data
def data(): return dict(form=crud())
File "/home/www/web2py/gluon/tools.py", line 1341, in __call__
redirect (self.settings.auth.settings.on_failed_authorization)
File "/home/www/web2py/gluon/http.py", line 88, in redirect
location = location.replace('\r', '%0D').replace('\n', '%0A')
AttributeError: 'NoneType' object has no attribute 'replace'

after I surround the place of error with try/except print str(e), I
get error again
http://files.akl.lt/users/jurgis/etc/web2py-weirderror.html

You can find the app (this is just first steps) for download
http://files.akl.lt/users/jurgis/etc/web2py.app.CodeByExample.tar

Jurgis

unread,
May 6, 2009, 10:03:11 AM5/6/09
to web2py Web Framework
there seems to be crud+auth problem

becauase if I not enable auth4crud
# crud.settings.auth=auth # (optional) enforces
authorization on crud

things work nicely

On 6 Geg, 16:12, Jurgis Pralgauskis <jurgis.pralgaus...@gmail.com>
wrote:
> get error againhttp://files.akl.lt/users/jurgis/etc/web2py-weirderror.html

mdipierro

unread,
May 6, 2009, 10:09:01 AM5/6/09
to web2py Web Framework
Is this trunk or stable? which built date?


On May 6, 8:12 am, Jurgis Pralgauskis <jurgis.pralgaus...@gmail.com>
wrote:
> get error againhttp://files.akl.lt/users/jurgis/etc/web2py-weirderror.html

Jurgis

unread,
May 6, 2009, 2:03:53 PM5/6/09
to web2py Web Framework
> Is this trunk or stable? which built date?

Version 1.61.4 (2009-04-21 10:02:50)

Jurgis

unread,
May 6, 2009, 2:21:06 PM5/6/09
to web2py Web Framework
by the way,

the registration confirmation email contains very incomplete link :/

Click on the link http://...verify_email/6a2cd595-17a1-4044-b5ef-1153e272f78e
to verify your email

Yarko Tymciurak

unread,
May 6, 2009, 2:26:04 PM5/6/09
to web...@googlegroups.com
If you get text email (not html) this might be a problem (that is, if you try to copy/paste the test);  the hyperlink should be correct though.

Jurgis

unread,
May 6, 2009, 2:42:00 PM5/6/09
to web2py Web Framework
same if I ask gmail to "show original" (in sender outbox)
http://files.akl.lt/users/jurgis/etc/web2py-verify_mail.txt
....
Message-ID: <4a01d963.1c18...@mx.google.com>
Date: Wed, 06 May 2009 11:39:31 -0700 (PDT)
From: laisvosp...@gmail.com
To: jurgis.pr...@gmail.com
Subject: Password verify

Click on the link http://...verify_email/82442a68-bffc-493b-a5ce-61480383ba4b
to verify your email

----
On 6 Geg, 21:26, Yarko Tymciurak <yark...@gmail.com> wrote:
> If you get text email (not html) this might be a problem (that is, if you
> try to copy/paste the test);  the hyperlink should be correct though.
>

Jurgis

unread,
May 6, 2009, 2:43:16 PM5/6/09
to web2py Web Framework
one more thing -- I am using Ubuntu 9.04
which aliases python to python2.6,
but now I started
python2.5 web2py

and the behaviour is the same...

mdipierro

unread,
May 6, 2009, 2:48:29 PM5/6/09
to web2py Web Framework
It is a feature, not a bug. You are supposed to customize the message

auth.messages.verify_email = 'Click on the link
http://hostname/appname/default/user/verify_email/%(key)s to verify
your email'

else web2py does not know what the public URL is.

Massimo

Yarko Tymciurak

unread,
May 6, 2009, 5:05:11 PM5/6/09
to web...@googlegroups.com
This will be a good one to test in-line sphinx docstring documentaiton (right by the defining line:

  self.messages.verify_email = ...

I will work on updating tools.py docstrings tonight so I can check this out...

Jurgis

unread,
May 7, 2009, 5:52:42 PM5/7/09
to web2py Web Framework

this also happens on 1.58 on Ubuntu 8.04 :/

> http://127.0.0.1:8000/app/default/data/tables
> shows empty window :/

> http://127.0.0.1:8000/app/default/data/select/Examples
> I get Error


> if I not enable
> # crud.settings.auth=auth # (optional) enforces
> but use in controller @auth.requires_login()
> things work nicely

so why is "crud.settings.auth = auth" needed?
Reply all
Reply to author
Forward
0 new messages