I believe this is fixed in trunk. Can you help test it?

On Sunday, 30 September 2012 13:08:10 UTC-5, David Sorrentino wrote:
>
> Sure I can! ;)
>
> Here it is:
>
> ERROR    2012-09-30 18:04:57,520 restricted.py:54] In FILE: 
>> /home/dapids/webdev/backinterface/web2py/applications/backinterface/controllers/default.py
>>
>> Traceback (most recent call last):
>>   File "/home/dapids/webdev/backinterface/web2py/gluon/restricted.py", 
>> line 209, in restricted
>>     exec ccode in environment
>>   File 
>> "/home/dapids/webdev/backinterface/web2py/applications/backinterface/controllers/default.py",
>>  
>> line 86, in <module>
>>   File "/home/dapids/webdev/backinterface/web2py/gluon/globals.py", line 
>> 186, in <lambda>
>>     self._caller = lambda f: f()
>>   File 
>> "/home/dapids/webdev/backinterface/web2py/applications/backinterface/controllers/default.py",
>>  
>> line 24, in editnews
>>     grid = SQLFORM.grid(db.news)
>>   File "/home/dapids/webdev/backinterface/web2py/gluon/sqlhtml.py", line 
>> 2042, in grid
>>     cacheable=True,*table_fields)
>>   File "/home/dapids/webdev/backinterface/web2py/gluon/dal.py", line 
>> 8719, in select
>>     return adapter.select(self.query,fields,attributes)
>>   File "/home/dapids/webdev/backinterface/web2py/gluon/dal.py", line 
>> 4546, in select
>>     for t in fields] for item in items]
>>   File 
>> "/home/dapids/google_appengine/google/appengine/ext/db/__init__.py", line 
>> 2082, in __iter__
>>     return self.run()
>>   File 
>> "/home/dapids/google_appengine/google/appengine/ext/db/__init__.py", line 
>> 2063, in run
>>     raw_query = self._get_query()
>>   File 
>> "/home/dapids/google_appengine/google/appengine/ext/db/__init__.py", line 
>> 2459, in _get_query
>>     _app=self._app)
>>   File "/home/dapids/google_appengine/google/appengine/api/datastore.py", 
>> line 1315, in __init__
>>     self.update(filters)
>>   File "/home/dapids/google_appengine/google/appengine/api/datastore.py", 
>> line 1764, in update
>>     self.__setitem__(filter, value)
>>   File "/home/dapids/google_appengine/google/appengine/api/datastore.py", 
>> line 1708, in __setitem__
>>     match = self._CheckFilter(filter, value)
>>   File "/home/dapids/google_appengine/google/appengine/api/datastore.py", 
>> line 1847, in _CheckFilter
>>     (datastore_types.KEY_SPECIAL_PROPERTY, value, typename(value)))
>> BadFilterError: invalid filter: __key__ filter value must be a Key; 
>> received None (a NoneType).
>>
>
> Thanks for your help Massimo.
>
> Cheers,
> David
>
>
> On 30 September 2012 19:40, Massimo Di Pierro 
> <massimo....@gmail.com<javascript:>
> > wrote:
>
>> Can you please post the entire traceback?
>>
>> Massimo
>>
>>
>> On Sunday, 30 September 2012 11:52:57 UTC-5, David Sorrentino wrote:
>>>
>>> Hi there! :)
>>>
>>> I'm trying to exploit the power of SQLFORM.grid with GAE but I'm having 
>>> some troubles.
>>> All I want to do is to have a grid from a table (seems to be simple 
>>> reading the infinite examples on the web).
>>>
>>> Here my table definition:
>>>
>>> db.define_table('news',
>>>>     Field('title'),
>>>>     Field('body', 'text')
>>>> )
>>>>
>>>
>>> Here the controller:
>>>
>>> @auth.requires_login()
>>>> def editnews():
>>>>     grid = SQLFORM.grid(db.news)
>>>>     return dict(grid=grid)
>>>>
>>>
>>> And here the view:
>>>
>>>  {{extend 'layout.html'}}
>>>> <p>{{=grid}}</p>
>>>>
>>>
>>> Unfortunately when I load the view I get this error:
>>>
>>> BadFilterError: invalid filter: __key__ filter value must be a Key; 
>>>> received None (a NoneType).
>>>>
>>>
>>> The errors seems to be in the definition of the grid, but I can't 
>>> understand what's wrong.
>>> Can somebody help me? :)
>>>
>>> Cheers,
>>> David
>>>
>>  -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to