app on GAE account a "admin disabled because unable to access password file" issue

11 views
Skip to first unread message

zhaopeng

unread,
Dec 26, 2008, 11:13:25 AM12/26/08
to web2py Web Framework
Hi All,
a small app works fine on web2py's default host server.but when it
runs on gae's dev_appserver,it account an issue:
Internal error
Ticket issued: unknown
admin disabled because unable to access password file
maybe it because i use session.token==1(or 0) to check whether the
user has login.
Is there some method to avoid the issue.

Thanks,
Peng

mdipierro

unread,
Dec 26, 2008, 11:33:43 AM12/26/08
to web2py Web Framework
admin is not supposed to run on GAE because GAE does not allow you to
write on filesystem.

You can make it work with minor tweaks but it would be useless because
of the limitation above.

Massimo

zhaopeng

unread,
Dec 26, 2008, 11:58:24 AM12/26/08
to web2py Web Framework
but this app does not use the admin app.

mdipierro

unread,
Dec 26, 2008, 12:11:52 PM12/26/08
to web2py Web Framework
sorry I misunderstood. web2py on GAE cannot save tickets but the
errors are in the GAE logs. You need to look in there to figure out
what the bug is.

You will get an error if you try to do a JOIN for example, write a
file, or do one of those things that GAE does not support.

If you cannot figure it out, feel free to post your code and we will
be happy to look at it.

Massimo

zhao peng

unread,
Dec 26, 2008, 12:33:13 PM12/26/08
to web...@googlegroups.com
I very appreciate your help,thanks a lot.
the app "note" and log on gae are attached.

Thanks,
Peng
note1.2.tar
log_on_gae.txt

mdipierro

unread,
Dec 26, 2008, 12:49:15 PM12/26/08
to web2py Web Framework
you have a db(db.table.id==value).select() where value is None.
This is not allowed on GAE.

Massimo

On Dec 26, 11:33 am, "zhao peng" <zhaopen...@gmail.com> wrote:
> I very appreciate your help,thanks a lot.
> the app "note" and log on gae are attached.
>
> Thanks,
> Peng
>
> note1.2.tar
> 498KViewDownload
>
> [log_on_gae.txt2K ]207 "http://web2note.appspot.com/note/note/index" -W 12-26 09:17AM 45.598
> no file lockingD 12-26 09:17AM 45.935
> no sqlite3 or dbapi2 driverD 12-26 09:17AM 45.939
> no MySQLdb driverD 12-26 09:17AM 45.942
> no psycopg2 driverD 12-26 09:17AM 45.947
> no cx_Oracle driverD 12-26 09:17AM 45.949
> no MSSQL driverD 12-26 09:17AM 45.960
> no kinterbasdb driverD 12-26 09:17AM 45.964
> no informixdb driverW 12-26 09:17AM 46.002
> unable to import dbhashW 12-26 09:17AM 46.008
> unable to import py_compileW 12-26 09:17AM 46.186
> unable to import wsgiserverW 12-26 09:17AM 47.027
> no cache.diskE 12-26 09:17AM 47.153
> Traceback (most recent call last):
> File "/base/data/home/apps/web2note/1.329967197348459447/gluon/restricted.py", line 62, in restricted
> exec ccode in environment
> File "/base/data/home/apps/web2note/1.329967197348459447/applications/note/controllers/note.py:listnote", line 29, in <module>
> File "/base/data/home/apps/web2note/1.329967197348459447/gluon/globals.py", line 55, in <lambda>
> self._caller=lambda f: f()
> File "/base/data/home/apps/web2note/1.329967197348459447/applications/note/controllers/note.py:listnote", line 16, in listnote
> File "/base/data/home/apps/web2note/1.329967197348459447/gluon/contrib/gql.py", line 210, in __eq__
> def __eq__(self,value): return SQLQuery(self,'=',value)
> File "/base/data/home/apps/web2note/1.329967197348459447/gluon/contrib/gql.py", line 329, in __init__
> self.get_one=QueryException(tablename=left._tablename,id=long(right))
> TypeError: long() argument must be a string or a number, not 'NoneType'

zhaopeng

unread,
Dec 26, 2008, 9:26:34 PM12/26/08
to web2py Web Framework
thanks,i found i should write it like this : value=int(request.args
[0]),then i can use it in db(db.table.id==value).select().
and another question:
write "orderby=~db.note.id" when select in db,it seems it will raise
an error:
ERROR 2008-12-27 01:57:36,750 main.py] Traceback (most recent call
last):
File "D:\web2py_src\gluon\restricted.py", line 62, in restricted
exec ccode in environment
File "D:\web2py_src\applications\note/controllers/note.py:listnote",
line 48,
in <module>
File "D:\web2py_src\gluon\globals.py", line 55, in <lambda>
self._caller=lambda f: f()
File "D:\web2py_src\applications\note/controllers/note.py:listnote",
line 30,
in listnote
File "D:\web2py_src\gluon\contrib\gql.py", line 444, in select
items,tablename,fields=self._select(*fields,**attributes)
File "D:\web2py_src\gluon\contrib\gql.py", line 417, in _select
items = items.order(order)
File "D:\Google\gae_src\google\appengine\ext\db\__init__.py", line
1577, in or
der
raise PropertyError('Invalid property name \'%s\'' % property)
PropertyError: Invalid property name 'id'

is there some way to descend the select results.
Thanks,
Peng

mdipierro

unread,
Dec 27, 2008, 3:11:23 AM12/27/08
to web2py Web Framework
GAE does not allow sorting by id because id is not treated as a field
of the record. You should timestamp the records when you create them
and use the timestamp for sorting.

Massimo

Jonathan Benn

unread,
Dec 27, 2008, 6:01:00 AM12/27/08
to web2py Web Framework
On Dec 27, 11:11 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> GAE does not allow sorting by id because id is not treated as a field
> of the record. You should timestamp the records when you create them
> and use the timestamp for sorting.

Ok, thanks. I noticed this issue as well when I was playing around
with sorting.

--Jonathan

mdipierro

unread,
Dec 27, 2008, 6:04:29 AM12/27/08
to web2py Web Framework
by the way... new in trunk... if db(db.table.id==None).select() no
longer gives an error but returns an empty SQLRows.

Massimo

Jonathan Benn

unread,
Dec 28, 2008, 1:12:36 AM12/28/08
to web2py Web Framework
On Dec 27, 2:04 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> by the way... new in trunk... if db(db.table.id==None).select() no
> longer gives an error but returns an empty SQLRows.

Thanks! Great idea. :)
Reply all
Reply to author
Forward
0 new messages