Google Datastore has no connector attribute

15 views
Skip to first unread message

Alan Etkin

unread,
Dec 15, 2013, 9:04:07 AM12/15/13
to web2py-d...@googlegroups.com
With the development server, web2py fails to store tickets in database because the ticket storage feature requires the adapter to have a .connector function implemented.

Was this fixed in trunk already?

I have solved it by adding this to GoogleDatastoreAdapter constructor in dal.py:

self.connector = lambda dbpath, adapter_args: None

My configuration:

Version 2.8.2-stable+timestamp.2013.11.28.13.54.07
GAE Python SDK release 1.8.8
Python 2.7.3 (default, Sep 26 2013, 20:08:41)
[GCC 4.6.3] on linux2

Massimo DiPierro

unread,
Dec 15, 2013, 2:31:06 PM12/15/13
to web2py-d...@googlegroups.com
Should now be fixed in trunk.

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alan Etkin

unread,
Dec 15, 2013, 5:16:25 PM12/15/13
to web2py-d...@googlegroups.com
Should now be fixed in trunk.

I thought I had solved it with that patch but I'm still having issues.

The adapter on reconnect calls raises an exception because the caller uses an invalid function signature. Tried this in dal.py:

class NoSQLAdapter(...):
    ...
    connector = lambda *args, **kwargs: None

but then it fails because there's no cursor object (set to None).

Is it possible to safely define a dummy reconnect function for GoogleDatastoreAdapter? Or is it required by GAE in any way?

Reply all
Reply to author
Forward
0 new messages