upgrading appengine has broken web2py

189 views
Skip to first unread message

Carl

unread,
Apr 11, 2013, 1:31:15 PM4/11/13
to web...@googlegroups.com
With an update to appengine, all is still fine when running web2py locally.
but if I run dev_appserver then on start-up I get the following kicked out at the console...

 File "F:\wp\TestEnvoy\web2py\gluon\contrib\gql.py", line 5, in <module>
    from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseAdapter, SQLField, SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL, SQLCustomType, gae
ImportError: cannot import name drivers

\contrib\gql.py exists for backward compatibility.

This looks like I've tripped up somewhere really simple. Can anyone point me in the right direction?

Massimo Di Pierro

unread,
Apr 11, 2013, 9:58:27 PM4/11/13
to web...@googlegroups.com
What if you delete that file?

Carl

unread,
Apr 12, 2013, 2:48:27 AM4/12/13
to web...@googlegroups.com
If I remove the file (and its .pyc) then I get a web2py "Ticket issued: unknown"

I'll try upgrading again.

Carl

unread,
Apr 12, 2013, 6:00:09 AM4/12/13
to web...@googlegroups.com
actually.. while getting an unknown ticket if I request the url a second time I get this:

  File "F:\wp\TestEnvoy\web2py\applications\init\models\db.py", line 13, in <module>
    from gluon.contrib.gql import *
  File "F:\wp\TestEnvoy\web2py\gluon\custom_import.py", line 100, in custom_importer
    return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
ImportError: No module named gql

That's fairly obvious because I've just delete gql.py! :)

Carl

unread,
Apr 12, 2013, 6:06:38 AM4/12/13
to web...@googlegroups.com
has my db.py content fallen out of date?

it includes:
from gluon.sql import SQLCustomType

if request.env.web2py_runtime_gae: # if running on Google App Engine
    from gluon.contrib.gql import *
    db = DAL('gae')

Carl

unread,
Apr 12, 2013, 6:21:10 AM4/12/13
to web...@googlegroups.com
Removing the line "from gluon.contrib.gql import *" removed the error and allows my app to launch.

I next run into this error:
  File "F:\wp\TestEnvoy\web2py\gluon\main.py", line 555, in wsgibase
    session._try_store_in_db(request, response)
  File "F:\wp\TestEnvoy\web2py\gluon\globals.py", line 747, in _try_store_in_db
    record_id = table.insert(**dd)
  File "F:\wp\TestEnvoy\web2py\gluon\contrib\memdb.py", line 256, in insert
    id = self._create_id()
  File "F:\wp\TestEnvoy\web2py\gluon\contrib\memdb.py", line 291, in _create_id
    id = self._tableobj.incr(shard_id)
AttributeError: 'MemcacheClient' object has no attribute 'incr'

One for me to investigate.

Carl

unread,
Apr 12, 2013, 6:35:09 AM4/12/13
to web...@googlegroups.com
Also in my db.py under " if request.env.web2py_runtime_gae: "
I have:

    from gluon.contrib.gae_memcache import MemcacheClient
    from gluon.contrib.memdb import MEMDB
    cache.memcache = MemcacheClient(request)
    cache.ram = cache.disk = cache.memcache

    session.connect(request, response, MEMDB(cache.memcache))

Has this approach become "out of date"?

Massimo Di Pierro

unread,
Apr 12, 2013, 11:17:28 AM4/12/13
to web...@googlegroups.com
I proposed in web2py 2.5 we remove the gql module.

Carl Roach

unread,
Apr 12, 2013, 12:10:10 PM4/12/13
to web...@googlegroups.com
Perhaps 2.5 isn't far away given 2.4.6 is out.

I'll be happy to a version of web2py with it removed.


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0XH6l1394mA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Christian Foster Howes

unread,
Apr 12, 2013, 6:34:13 PM4/12/13
to web...@googlegroups.com
i'm not having any problems with GAE + web2py.....though i'm not fully upgraded on my web2py versions...perhaps i should do a test upgrade and see if i hit the same issues.

Carl Roach

unread,
Apr 13, 2013, 12:13:26 AM4/13/13
to web...@googlegroups.com

What version are you using Christian?

Christian Foster Howes

unread,
Apr 13, 2013, 4:51:40 PM4/13/13
to web...@googlegroups.com, Carl Roach
The 2 versions that i have used this week with the latest GAE are:

Version 2.0.8 (2012-09-07 03:47:51) stable
Version 2.0.9 (2012-09-13 23:51:30) stable

cfh

On 4/12/13 21:13 , Carl Roach wrote:
> What version are you using Christian?
> On 12 Apr 2013 23:34, "Christian Foster Howes" <cfh...@gmail.com> wrote:
>
>> i'm not having any problems with GAE + web2py.....though i'm not fully
>> upgraded on my web2py versions...perhaps i should do a test upgrade and see
>> if i hit the same issues.
>>
>> On Friday, April 12, 2013 9:10:10 AM UTC-7, Carl wrote:
>>>
>>> Perhaps 2.5 isn't far away given 2.4.6 is out.
>>>
>>> I'll be happy to a version of web2py with it removed.
>>>
>>>
>>> On 12 April 2013 16:17, Massimo Di Pierro <massimo....@gmail.com> wrote:
>>>
>>>> I proposed in web2py 2.5 we remove the gql module.
>>>>
>>>>
>>>> On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote:
>>>>>
>>>>> Removing the line "from gluon.contrib.gql import *" removed the error
>>>>> and allows my app to launch.
>>>>>
>>>>> I next run into this error:
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****main.py", line 555, in
>>>>> wsgibase
>>>>> session._try_store_in_db(**reque**st, response)
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****globals.py", line 747, in
>>>>> _try_store_in_db
>>>>> record_id = table.insert(**dd)
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\memdb.py", line 256,
>>>>> in insert
>>>>> id = self._create_id()
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\memdb.py", line 291,
>>>>> in _create_id
>>>>> id = self._tableobj.incr(shard_id)
>>>>> AttributeError: 'MemcacheClient' object has no attribute 'incr'
>>>>>
>>>>> One for me to investigate.
>>>>>
>>>>>
>>>>>
>>>>> On Friday, 12 April 2013 11:06:38 UTC+1, Carl wrote:
>>>>>>
>>>>>> has my db.py content fallen out of date?
>>>>>>
>>>>>> it includes:
>>>>>> from gluon.sql import SQLCustomType
>>>>>>
>>>>>> if request.env.web2py_runtime_**gae**: # if running on Google App
>>>>>> Engine
>>>>>> from gluon.contrib.gql import *
>>>>>> db = DAL('gae')
>>>>>>
>>>>>>
>>>>>> On Friday, 12 April 2013 11:00:09 UTC+1, Carl wrote:
>>>>>>>
>>>>>>> actually.. while getting an unknown ticket if I request the url a
>>>>>>> second time I get this:
>>>>>>>
>>>>>>> File "F:\wp\TestEnvoy\web2py\**applic**ations\init\models\db.**py",
>>>>>>> line 13, in <module>
>>>>>>> from gluon.contrib.gql import *
>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****custom_import.py", line
>>>>>>> 100, in custom_importer
>>>>>>> return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
>>>>>>> ImportError: No module named gql
>>>>>>>
>>>>>>> That's fairly obvious because I've just delete gql.py! :)
>>>>>>>
>>>>>>>
>>>>>>> On Friday, 12 April 2013 07:48:27 UTC+1, Carl wrote:
>>>>>>>>
>>>>>>>> If I remove the file (and its .pyc) then I get a web2py "Ticket
>>>>>>>> issued: unknown"
>>>>>>>>
>>>>>>>> I'll try upgrading again.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Friday, 12 April 2013 02:58:27 UTC+1, Massimo Di Pierro wrote:
>>>>>>>>>
>>>>>>>>> What if you delete that file?
>>>>>>>>>
>>>>>>>>> On Thursday, 11 April 2013 12:31:15 UTC-5, Carl wrote:
>>>>>>>>>>
>>>>>>>>>> With an update to appengine, all is still fine when running web2py
>>>>>>>>>> locally.
>>>>>>>>>> but if I run dev_appserver then on start-up I get the following
>>>>>>>>>> kicked out at the console...
>>>>>>>>>>
>>>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\gql.py", line 5,
>>>>>>>>>> in <module>
>>>>>>>>>> from gluon.dal import DAL, Field, Table, Query, Set,
>>>>>>>>>> Expression, Row, Rows, *drivers*, BaseAdapter, SQLField,
>>>>>>>>>> SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB,
>>>>>>>>>> SQLALL, SQLCustomType, gae
>>>>>>>>>> ImportError: cannot import name *drivers*
>>>>>>>>>> *
>>>>>>>>>> *
>>>>>>>>>> \contrib\gql.py exists for backward compatibility.
>>>>>>>>>>
>>>>>>>>>> This looks like I've tripped up somewhere really simple. Can
>>>>>>>>>> anyone point me in the right direction?
>>>>>>>>>>
>>>>>>>>> --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "web2py-users" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>>> topic/web2py/0XH6l1394mA/**unsubscribe?hl=en<https://groups.google.com/d/topic/web2py/0XH6l1394mA/unsubscribe?hl=en>
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> web2py+un...@**googlegroups.com.
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .

Carl Roach

unread,
Apr 13, 2013, 4:55:04 PM4/13/13
to Christian Foster Howes, web...@googlegroups.com
thanks - I'll give them a go.


Carl

unread,
Jun 5, 2013, 10:15:25 AM6/5/13
to web...@googlegroups.com
hi Christian,

Have you gotten round to upgrading a test version of your app to the latest Web2py version?
[I don't think there can be many users of Web2py who deploy on GAE - this forum is very quiet considering Web2py hasn't supported GAE for around two months now.]

Alan Etkin

unread,
Jun 5, 2013, 1:08:47 PM6/5/13
to web...@googlegroups.com
[I don't think there can be many users of Web2py who deploy on GAE

Maybe you can open an issue in the project page. That way the upgrading problem will not get lost within the lots of threads of this group. If you do, post as clear as possible the problem you are having including system info, traceback, versions used, etc.

 

Christian Foster Howes

unread,
Jun 5, 2013, 1:12:57 PM6/5/13
to web...@googlegroups.com, Carl
Hi Carl,

i've been spread pretty thin lately and have not tried the updated
web2py yet. If i'm lucky I can play with it on sunday for a bit and see
how it works for me.

christian

On 6/5/13 7:15 , Carl wrote:
> hi Christian,
>
> Have you gotten round to upgrading a test version of your app to the latest
> Web2py version?
> [I don't think there can be many users of Web2py who deploy on GAE - this
> forum is very quiet considering Web2py hasn't supported GAE for around two
> months now.]
>
>
>
> On Friday, 12 April 2013 23:34:13 UTC+1, Christian Foster Howes wrote:
>>
>> i'm not having any problems with GAE + web2py.....though i'm not fully
>> upgraded on my web2py versions...perhaps i should do a test upgrade and see
>> if i hit the same issues.
>>
>> On Friday, April 12, 2013 9:10:10 AM UTC-7, Carl wrote:
>>>
>>> Perhaps 2.5 isn't far away given 2.4.6 is out.
>>>
>>> I'll be happy to a version of web2py with it removed.
>>>
>>>
>>> On 12 April 2013 16:17, Massimo Di Pierro <massimo....@gmail.com> wrote:
>>>
>>>> I proposed in web2py 2.5 we remove the gql module.
>>>>
>>>>
>>>> On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote:
>>>>>
>>>>> Removing the line "from gluon.contrib.gql import *" removed the error
>>>>> and allows my app to launch.
>>>>>
>>>>> I next run into this error:
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**main.py", line 555, in wsgibase
>>>>> session._try_store_in_db(**request, response)
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**globals.py", line 747, in
>>>>> _try_store_in_db
>>>>> record_id = table.insert(**dd)
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\memdb.py", line 256, in
>>>>> insert
>>>>> id = self._create_id()
>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\memdb.py", line 291, in
>>>>> _create_id
>>>>> id = self._tableobj.incr(shard_id)
>>>>> AttributeError: 'MemcacheClient' object has no attribute 'incr'
>>>>>
>>>>> One for me to investigate.
>>>>>
>>>>>
>>>>>
>>>>> On Friday, 12 April 2013 11:06:38 UTC+1, Carl wrote:
>>>>>>
>>>>>> has my db.py content fallen out of date?
>>>>>>
>>>>>> it includes:
>>>>>> from gluon.sql import SQLCustomType
>>>>>>
>>>>>> if request.env.web2py_runtime_**gae: # if running on Google App Engine
>>>>>> from gluon.contrib.gql import *
>>>>>> db = DAL('gae')
>>>>>>
>>>>>>
>>>>>> On Friday, 12 April 2013 11:00:09 UTC+1, Carl wrote:
>>>>>>>
>>>>>>> actually.. while getting an unknown ticket if I request the url a
>>>>>>> second time I get this:
>>>>>>>
>>>>>>> File "F:\wp\TestEnvoy\web2py\**applications\init\models\db.**py",
>>>>>>> line 13, in <module>
>>>>>>> from gluon.contrib.gql import *
>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**custom_import.py", line 100,
>>>>>>> in custom_importer
>>>>>>> return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
>>>>>>> ImportError: No module named gql
>>>>>>>
>>>>>>> That's fairly obvious because I've just delete gql.py! :)
>>>>>>>
>>>>>>>
>>>>>>> On Friday, 12 April 2013 07:48:27 UTC+1, Carl wrote:
>>>>>>>>
>>>>>>>> If I remove the file (and its .pyc) then I get a web2py "Ticket
>>>>>>>> issued: unknown"
>>>>>>>>
>>>>>>>> I'll try upgrading again.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Friday, 12 April 2013 02:58:27 UTC+1, Massimo Di Pierro wrote:
>>>>>>>>>
>>>>>>>>> What if you delete that file?
>>>>>>>>>
>>>>>>>>> On Thursday, 11 April 2013 12:31:15 UTC-5, Carl wrote:
>>>>>>>>>>
>>>>>>>>>> With an update to appengine, all is still fine when running web2py
>>>>>>>>>> locally.
>>>>>>>>>> but if I run dev_appserver then on start-up I get the following
>>>>>>>>>> kicked out at the console...
>>>>>>>>>>
>>>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\gql.py", line 5, in
>>>>>>>>>> <module>
>>>>>>>>>> from gluon.dal import DAL, Field, Table, Query, Set,
>>>>>>>>>> Expression, Row, Rows, *drivers*, BaseAdapter, SQLField,
>>>>>>>>>> SQLTable, SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB,
>>>>>>>>>> SQLALL, SQLCustomType, gae
>>>>>>>>>> ImportError: cannot import name *drivers*
>>>>>>>>>> *
>>>>>>>>>> *

Carl Roach

unread,
Jun 18, 2013, 4:21:00 AM6/18/13
to web...@googlegroups.com
hi Massimo,

What would be the implications of removing the gql modulefrom Web2py?




On 12 April 2013 16:17, Massimo Di Pierro <massimo....@gmail.com> wrote:
--

Massimo Di Pierro

unread,
Jun 18, 2013, 4:57:10 AM6/18/13
to web...@googlegroups.com
None except that some very old web2py GAE applications may be doing "import gql". It is there only for backward compatibility.

Christian Foster Howes

unread,
Jun 18, 2013, 9:20:07 AM6/18/13
to web...@googlegroups.com, Massimo Di Pierro
Carl,

i have been working through my web2py upgrade to 2.5.1 + GAE SDK 1.8.1
upgrade and am not seeing any problems with DAL or GQL. i did have to
change some cache.ram.flush_all() to cache.ram.clear() to work with the
latest web2py, and am making adjustments to work with the updated
custom_import code.

cfh

On 6/18/13 1:57 , Massimo Di Pierro wrote:
> None except that some very old web2py GAE applications may be doing "import
> gql". It is there only for backward compatibility.
>
> On Tuesday, 18 June 2013 03:21:00 UTC-5, Carl wrote:
>>
>> hi Massimo,
>>
>> What would be the implications of removing the gql modulefrom Web2py?
>>
>>
>>
>>
>> On 12 April 2013 16:17, Massimo Di Pierro <massimo....@gmail.com<javascript:>
>>> wrote:
>>
>>> I proposed in web2py 2.5 we remove the gql module.
>>>
>>>
>>> On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote:
>>>>
>>>> Removing the line "from gluon.contrib.gql import *" removed the error
>>>> and allows my app to launch.
>>>>
>>>> I next run into this error:
>>>> File "F:\wp\TestEnvoy\web2py\gluon\**main.py", line 555, in wsgibase
>>>> session._try_store_in_db(**request, response)
>>>> File "F:\wp\TestEnvoy\web2py\gluon\**globals.py", line 747, in
>>>> _try_store_in_db
>>>> record_id = table.insert(**dd)
>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\memdb.py", line 256, in
>>>> insert
>>>> id = self._create_id()
>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\memdb.py", line 291, in
>>>> _create_id
>>>> id = self._tableobj.incr(shard_id)
>>>> AttributeError: 'MemcacheClient' object has no attribute 'incr'
>>>>
>>>> One for me to investigate.
>>>>
>>>>
>>>>
>>>> On Friday, 12 April 2013 11:06:38 UTC+1, Carl wrote:
>>>>>
>>>>> has my db.py content fallen out of date?
>>>>>
>>>>> it includes:
>>>>> from gluon.sql import SQLCustomType
>>>>>
>>>>> if request.env.web2py_runtime_**gae: # if running on Google App Engine
>>>>> from gluon.contrib.gql import *
>>>>> db = DAL('gae')
>>>>>
>>>>>
>>>>> On Friday, 12 April 2013 11:00:09 UTC+1, Carl wrote:
>>>>>>
>>>>>> actually.. while getting an unknown ticket if I request the url a
>>>>>> second time I get this:
>>>>>>
>>>>>> File "F:\wp\TestEnvoy\web2py\**applications\init\models\db.**py",
>>>>>> line 13, in <module>
>>>>>> from gluon.contrib.gql import *
>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**custom_import.py", line 100,
>>>>>> in custom_importer
>>>>>> return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
>>>>>> ImportError: No module named gql
>>>>>>
>>>>>> That's fairly obvious because I've just delete gql.py! :)
>>>>>>
>>>>>>
>>>>>> On Friday, 12 April 2013 07:48:27 UTC+1, Carl wrote:
>>>>>>>
>>>>>>> If I remove the file (and its .pyc) then I get a web2py "Ticket
>>>>>>> issued: unknown"
>>>>>>>
>>>>>>> I'll try upgrading again.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Friday, 12 April 2013 02:58:27 UTC+1, Massimo Di Pierro wrote:
>>>>>>>>
>>>>>>>> What if you delete that file?
>>>>>>>>
>>>>>>>> On Thursday, 11 April 2013 12:31:15 UTC-5, Carl wrote:
>>>>>>>>>
>>>>>>>>> With an update to appengine, all is still fine when running web2py
>>>>>>>>> locally.
>>>>>>>>> but if I run dev_appserver then on start-up I get the following
>>>>>>>>> kicked out at the console...
>>>>>>>>>
>>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\**contrib\gql.py", line 5, in
>>>>>>>>> <module>
>>>>>>>>> from gluon.dal import DAL, Field, Table, Query, Set,
>>>>>>>>> Expression, Row, Rows, *drivers*, BaseAdapter, SQLField, SQLTable,
>>>>>>>>> SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB, SQLALL,
>>>>>>>>> SQLCustomType, gae
>>>>>>>>> ImportError: cannot import name *drivers*
>>>>>>>>> *
>>>>>>>>> *
>>>>>>>>> \contrib\gql.py exists for backward compatibility.
>>>>>>>>>
>>>>>>>>> This looks like I've tripped up somewhere really simple. Can anyone
>>>>>>>>> point me in the right direction?
>>>>>>>>>
>>>>>>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/web2py/0XH6l1394mA/unsubscribe?hl=en.
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@googlegroups.com <javascript:>.

Massimo DiPierro

unread,
Jun 18, 2013, 9:36:24 AM6/18/13
to Christian Foster Howes, web...@googlegroups.com
I did see two problems addressed in a commit today.

gql imports drivers from dal.py but drivers was renamed DRIVERS. If people did not notice this it means they are not importing gql. This is great. It means this backward compatibility file can be removed. So I just did.

The second issue is that gae_memcache has an increment method instead of incr, as expected by memdb. This is now fixed too.

Please submit any patch you may have, even if partial.

massimo

Carl Roach

unread,
Jun 18, 2013, 10:23:28 AM6/18/13
to web...@googlegroups.com, Massimo Di Pierro
thanks C
perhaps I can also change my web2py code to get the app running. M has been making changes in trunk to remove the gql.py. this might address my issue too. I tried trunk but got a bunch of unresolved imports from Eclipse.


To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0XH6l1394mA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Christian Foster Howes

unread,
Jun 19, 2013, 11:30:41 AM6/19/13
to Massimo DiPierro, web...@googlegroups.com
patch submitted here: https://code.google.com/p/web2py/issues/detail?id=1546

note that i had been using cache.ram.flush_all() for clearing GAE
memcache, but that changed to using cache.ram.clear() in this version.
i just updated my source. :)

i also had to tweak my path configs for unit testing, and rename a
module that i had called "utils.py" to work with the new
custom_import.py (my utils module was clashing with gluon/utils.py with
the updated importer).

christian

Carl

unread,
Jul 12, 2013, 10:36:35 AM7/12/13
to web...@googlegroups.com, Massimo Di Pierro
Chrtistian... are you using MemcacheClient in your db.py file?
I've take a copy of the master source code and moved to db = DAL('google:datastore') but I'm not sure if I need to set-up session management differently to earlier versions of Web2py.

I currently have session.connect(request, response, MEMDB(MemcacheClient(request))

Carl

unread,
Jul 12, 2013, 10:48:59 AM7/12/13
to web...@googlegroups.com, Massimo Di Pierro
sorry... error in this posting (but not in my code)

I currently have session.connect(request, response, db=MEMDB(cache.memcache))

Christian Foster Howes

unread,
Jul 12, 2013, 1:26:53 PM7/12/13
to web...@googlegroups.com, Carl, Massimo Di Pierro
I'm storing session in the database given the large number of active
users i have at anytime and the un-predictable eviction of GAE memcache.

sorry that's not very helpful. :(

cfh

Carl Roach

unread,
Jul 12, 2013, 1:56:11 PM7/12/13
to Christian Foster Howes, web...@googlegroups.com, Massimo Di Pierro
that's great to know!
that's probably why Web2py didn't break for you but did for me... it broke GAE memcache.

thanks for getting back to me.


Christian Foster Howes

unread,
Jul 12, 2013, 3:48:11 PM7/12/13
to Carl Roach, web...@googlegroups.com, Massimo Di Pierro
bummer. i am successfully using memcache in other parts of my GAE app,
so maybe it's a problem with how memdb uses GAE memcache?

cfh
>>>>>> On 12 April 2013 16:17, Massimo Di Pierro <massimo....@gmail.com<**
>>>>>> javascript:>
>>>>>>
>>>>>
>>>> wrote:
>>>>>>>
>>>>>>
>>>>>> I proposed in web2py 2.5 we remove the gql module.
>>>>>>>
>>>>>>>
>>>>>>> On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Removing the line "from gluon.contrib.gql import *" removed the error
>>>>>>>> and allows my app to launch.
>>>>>>>>
>>>>>>>> I next run into this error:
>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****main.py", line 555, in
>>>>>>>>
>>>>>>> wsgibase
>>>>
>>>>> session._try_store_in_db(****request, response)
>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****globals.py", line 747, in
>>>>>>>> _try_store_in_db
>>>>>>>> record_id = table.insert(**dd)
>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\memdb.py", line
>>>>>>>> 256,
>>>>>>>>
>>>>>>> in
>>>>
>>>>> insert
>>>>>>>> id = self._create_id()
>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\memdb.py", line
>>>>>>>> 291,
>>>>>>>>
>>>>>>> in
>>>>
>>>>> _create_id
>>>>>>>> id = self._tableobj.incr(shard_id)
>>>>>>>> AttributeError: 'MemcacheClient' object has no attribute 'incr'
>>>>>>>>
>>>>>>>> One for me to investigate.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Friday, 12 April 2013 11:06:38 UTC+1, Carl wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> has my db.py content fallen out of date?
>>>>>>>>>
>>>>>>>>> it includes:
>>>>>>>>> from gluon.sql import SQLCustomType
>>>>>>>>>
>>>>>>>>> if request.env.web2py_runtime_****gae: # if running on Google App
>>>>>>>>>
>>>>>>>> Engine
>>>>
>>>>> from gluon.contrib.gql import *
>>>>>>>>> db = DAL('gae')
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Friday, 12 April 2013 11:00:09 UTC+1, Carl wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> actually.. while getting an unknown ticket if I request the url a
>>>>>>>>>> second time I get this:
>>>>>>>>>>
>>>>>>>>>> File
>>>>>>>>>>
>>>>>>>>> "F:\wp\TestEnvoy\web2py\****applications\init\models\db.****py",
>>>>
>>>>> line 13, in <module>
>>>>>>>>>> from gluon.contrib.gql import *
>>>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****custom_import.py", line
>>>>>>>>>>
>>>>>>>>> 100,
>>>>
>>>>> in custom_importer
>>>>>>>>>> return NATIVE_IMPORTER(name, globals, locals, fromlist,
>>>>>>>>>> level)
>>>>>>>>>> ImportError: No module named gql
>>>>>>>>>>
>>>>>>>>>> That's fairly obvious because I've just delete gql.py! :)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Friday, 12 April 2013 07:48:27 UTC+1, Carl wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> If I remove the file (and its .pyc) then I get a web2py "Ticket
>>>>>>>>>>> issued: unknown"
>>>>>>>>>>>
>>>>>>>>>>> I'll try upgrading again.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Friday, 12 April 2013 02:58:27 UTC+1, Massimo Di Pierro wrote:
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> What if you delete that file?
>>>>>>>>>>>>
>>>>>>>>>>>> On Thursday, 11 April 2013 12:31:15 UTC-5, Carl wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> With an update to appengine, all is still fine when running
>>>>>>>>>>>>>
>>>>>>>>>>>> web2py
>>>>
>>>>> locally.
>>>>>>>>>>>>> but if I run dev_appserver then on start-up I get the following
>>>>>>>>>>>>> kicked out at the console...
>>>>>>>>>>>>>
>>>>>>>>>>>>> File "F:\wp\TestEnvoy\web2py\gluon\****contrib\gql.py",
>>>>>>>>>>>>> line 5,
>>>>>>>>>>>>>
>>>>>>>>>>>> in
>>>>
>>>>> <module>
>>>>>>>>>>>>> from gluon.dal import DAL, Field, Table, Query, Set,
>>>>>>>>>>>>> Expression, Row, Rows, *drivers*, BaseAdapter, SQLField,
>>>>>>>>>>>>>
>>>>>>>>>>>> SQLTable,
>>>>
>>>>> SQLXorable, SQLQuery, SQLSet, SQLRows, SQLStorage, SQLDB, GQLDB,
>>>>>>>>>>>>>
>>>>>>>>>>>> SQLALL,
>>>>
>>>>> SQLCustomType, gae
>>>>>>>>>>>>> ImportError: cannot import name *drivers*
>>>>>>>>>>>>> *
>>>>>>>>>>>>> *
>>>>>>>>>>>>> \contrib\gql.py exists for backward compatibility.
>>>>>>>>>>>>>
>>>>>>>>>>>>> This looks like I've tripped up somewhere really simple. Can
>>>>>>>>>>>>>
>>>>>>>>>>>> anyone
>>>>
>>>>> point me in the right direction?
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to a topic in the
>>>>>>> Google Groups "web2py-users" group.
>>>>>>> To unsubscribe from this topic, visit
>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>>> web2py+un...@googlegroups.com <javascript:>.
>>>>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>
Reply all
Reply to author
Forward
0 new messages