[web2py] Re: Problem with .smartgrid on tables with links

2012-01-26 Thread Massimo Di Pierro
please check trunk again.

On Jan 26, 12:34 pm, Jim Steil j...@qlf.com wrote:
 Thanks Carlos - not just me then...

 On 1/26/2012 12:31 PM, Carlos wrote:







  Hi,

  I am not using smartgrid, and I am using regular tables (with the 'id'
  field), and I still get the same error (as described in my post):

     https://groups.google.com/d/topic/web2py/zH9rLsbxI_I/discussion

  I guess Massimo is still working on this?.

     Carlos


Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-26 Thread Jim Steil

That fixed it.  Thanks Massimo!

-Jim

On 1/26/2012 12:55 PM, Massimo Di Pierro wrote:

please check trunk again.

On Jan 26, 12:34 pm, Jim Steilj...@qlf.com  wrote:

Thanks Carlos - not just me then...

On 1/26/2012 12:31 PM, Carlos wrote:








Hi,
I am not using smartgrid, and I am using regular tables (with the 'id'
field), and I still get the same error (as described in my post):
https://groups.google.com/d/topic/web2py/zH9rLsbxI_I/discussion
I guess Massimo is still working on this?.
Carlos


Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-24 Thread rochacbruno
I just got the same error

type 'exceptions.KeyError' '_id'

Traceback (most recent call last):
  File /home/bruce/projects/web2py/gluon/restricted.py, line 204, in 
restricted
exec ccode in environment
  File /home/bruce/projects/web2py/applications/demo/controllers/appadmin.py 
http://localhost:8000/admin/default/edit/demo/controllers/appadmin.py, line 
466, in module
  File /home/bruce/projects/web2py/gluon/globals.py, line 172, in lambda
self._caller = lambda f: f()
  File /home/bruce/projects/web2py/applications/demo/controllers/appadmin.py 
http://localhost:8000/admin/default/edit/demo/controllers/appadmin.py, line 
313, in update
if form.accepts(request.vars, session):
  File /home/bruce/projects/web2py/gluon/sqlhtml.py, line 1088, in accepts
hideerror=hideerror,
  File /home/bruce/projects/web2py/gluon/html.py, line 1807, in accepts
status = self._traverse(status,hideerror)
  File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse
newstatus = c._traverse(status,hideerror) and newstatus
  File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse
newstatus = c._traverse(status,hideerror) and newstatus
  File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse
newstatus = c._traverse(status,hideerror) and newstatus
  File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse
newstatus = c._traverse(status,hideerror) and newstatus
  File /home/bruce/projects/web2py/gluon/html.py, line 756, in _traverse
newstatus = self._validate()
  File /home/bruce/projects/web2py/gluon/html.py, line 1572, in _validate
(value, errors) = validator(value)
  File /home/bruce/projects/web2py/gluon/validators.py, line 549, in __call__
elif str(rows[0]._id) != str(self.record_id):
  File /home/bruce/projects/web2py/gluon/dal.py, line 5466, in __getattr__
return self[key]
  File /home/bruce/projects/web2py/gluon/dal.py, line 5457, in __getitem__
return dict.__getitem__(self, key)
KeyError: '_id'

with default auth_user table and some extra_fields added




Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-24 Thread Bruno Rocha
*I forgot to mention that the error was in /default/user/profile action*

On Wed, Jan 25, 2012 at 4:51 AM, rochacbruno rochacbr...@gmail.com wrote:

 I just got the same error

 type 'exceptions.KeyError' '_id'

 Traceback (most recent call last
 ):
   File /home/bruce/projects/web2py/gluon/restricted.py, line 204, in 
 restricted

 exec ccode in environment
   File 
 /home/bruce/projects/web2py/applications/demo/controllers/appadmin.py 
 http://localhost:8000/admin/default/edit/demo/controllers/appadmin.py, line 
 466, in module

   File /home/bruce/projects/web2py/gluon/globals.py, line 172, in lambda

 self._caller = lambda f: f
 ()
   File 
 /home/bruce/projects/web2py/applications/demo/controllers/appadmin.py 
 http://localhost:8000/admin/default/edit/demo/controllers/appadmin.py, line 
 313, in update

 if form.accepts(request.vars, session):

   File /home/bruce/projects/web2py/gluon/sqlhtml.py, line 1088, in accepts

 hideerror=hideerror,
   File /home/bruce/projects/web2py/gluon/html.py, line 1807, in accepts

 status = self._traverse(status,hideerror)

   File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse

 newstatus = c._traverse(status,hideerror) and newstatus

   File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse

 newstatus = c._traverse(status,hideerror) and newstatus

   File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse

 newstatus = c._traverse(status,hideerror) and newstatus

   File /home/bruce/projects/web2py/gluon/html.py, line 749, in _traverse

 newstatus = c._traverse(status,hideerror) and newstatus

   File /home/bruce/projects/web2py/gluon/html.py, line 756, in _traverse

 newstatus = self._validate()
   File /home/bruce/projects/web2py/gluon/html.py, line 1572, in _validate

 (value, errors) = validator(value)

   File /home/bruce/projects/web2py/gluon/validators.py, line 549, in 
 __call__

 elif str(rows[0]._id) != str(self.record_id):

   File /home/bruce/projects/web2py/gluon/dal.py, line 5466, in __getattr__

 return self[key]
   File /home/bruce/projects/web2py/gluon/dal.py, line 5457, in __getitem__

 return dict.__getitem__(self, key)
 KeyError: '_id'

 with default auth_user table and some extra_fields added





-- 

Bruno Rocha
[http://rochacbruno.com.br]


[web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Massimo Di Pierro
can you check if trunk fixed it?

On Jan 19, 10:45 am, Jim Steil j...@qlf.com wrote:
 Hi

 Just updated to the latest trunk this morning and now my smartgrids
 aren't working where the table being used has links.

 Here is what I'm getting:

 Traceback(most recent call last):
    FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
      execccodeinenvironment
    FileC:/dev/web2py/applications/infocenter/controllers/administration.py  
 http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
    FileC:\dev\web2py\gluon\globals.py,line172,inlambda
      self._caller=lambdaf:f()
    FileC:\dev\web2py\gluon\tools.py,line2530,inf
      returnaction(*a, **b)
    FileC:/dev/web2py/applications/infocenter/controllers/administration.py  
 http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
      paginate=15,maxtextlength=45)
    FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
      user_signature=user_signature,**kwargs)
    FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
      iflink(row):
    FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
      args=request.args[:nargs]+[args0,row.id])))
    FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
      return self[key]
    FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
      returndict.__getitem__(self,key)
 KeyError:'id'

 If the table doesn't have any fields referencing other tables, then it
 works fine.

 Is it just me?

      -Jim


Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Jim Steil

Massimo

I think I'm having trouble getting the latest from the trunk.  Here is 
what I'm seeing when I do a pull and then update:



I don't know enough about mercurial to know why this is.

I'm going to do a fresh install from trunk and see what happens.

-Jim

On 1/20/2012 12:19 PM, Massimo Di Pierro wrote:

can you check if trunk fixed it?

On Jan 19, 10:45 am, Jim Steilj...@qlf.com  wrote:

Hi

Just updated to the latest trunk this morning and now my smartgrids
aren't working where the table being used has links.

Here is what I'm getting:

Traceback(most recent call last):
FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
  execccodeinenvironment

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
FileC:\dev\web2py\gluon\globals.py,line172,inlambda
  self._caller=lambdaf:f()
FileC:\dev\web2py\gluon\tools.py,line2530,inf
  returnaction(*a, **b)

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
  paginate=15,maxtextlength=45)
FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
  user_signature=user_signature,**kwargs)
FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
  iflink(row):
FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
  args=request.args[:nargs]+[args0,row.id])))
FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
  return self[key]
FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
  returndict.__getitem__(self,key)
KeyError:'id'

If the table doesn't have any fields referencing other tables, then it
works fine.

Is it just me?

  -Jim
inline: gfhcgedb.png

Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Jim Steil

Massimo

Just did a fresh - hg clone https://code.google.com/p/web2py

...added my app to that installation

and am seeing the same traceback I was getting yesterday.

Traceback(most recent call last):
  FileC:\Deleteme\web2py\gluon\restricted.py,line204,inrestricted
execccodeinenvironment
  FileC:/Deleteme/web2py/applications/infocenter/controllers/administration.py  
http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/administration.py,line1816,inmodule
  FileC:\Deleteme\web2py\gluon\globals.py,line172,inlambda
self._caller=lambdaf:f()
  FileC:\Deleteme\web2py\gluon\tools.py,line2530,inf
returnaction(*a, **b)
  FileC:/Deleteme/web2py/applications/infocenter/controllers/administration.py  
http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/administration.py,line457,inassetTypes
paginate=15,maxtextlength=45)
  FileC:\Deleteme\web2py\gluon\sqlhtml.py,line1967,insmartgrid
user_signature=user_signature,**kwargs)
  FileC:\Deleteme\web2py\gluon\sqlhtml.py,line1815,ingrid
iflink(row):
  FileC:\Deleteme\web2py\gluon\sqlhtml.py,line1964,inlambda
args=request.args[:nargs]+[args0,row.id])))
  FileC:\Deleteme\web2py\gluon\dal.py,line4996,in__getattr__
return self[key]
  FileC:\Deleteme\web2py\gluon\dal.py,line4987,in__getitem__
returndict.__getitem__(self,key)
KeyError:'id'


-Jim

On 1/20/2012 12:19 PM, Massimo Di Pierro wrote:

can you check if trunk fixed it?

On Jan 19, 10:45 am, Jim Steilj...@qlf.com  wrote:

Hi

Just updated to the latest trunk this morning and now my smartgrids
aren't working where the table being used has links.

Here is what I'm getting:

Traceback(most recent call last):
FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
  execccodeinenvironment

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
FileC:\dev\web2py\gluon\globals.py,line172,inlambda
  self._caller=lambdaf:f()
FileC:\dev\web2py\gluon\tools.py,line2530,inf
  returnaction(*a, **b)

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
  paginate=15,maxtextlength=45)
FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
  user_signature=user_signature,**kwargs)
FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
  iflink(row):
FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
  args=request.args[:nargs]+[args0,row.id])))
FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
  return self[key]
FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
  returndict.__getitem__(self,key)
KeyError:'id'

If the table doesn't have any fields referencing other tables, then it
works fine.

Is it just me?

  -Jim


[web2py] Re: Problem with .smartgrid on tables with links

2012-01-19 Thread Massimo Di Pierro
Do the tables have id fields called other than id?

On Jan 19, 10:45 am, Jim Steil j...@qlf.com wrote:
 Hi

 Just updated to the latest trunk this morning and now my smartgrids
 aren't working where the table being used has links.

 Here is what I'm getting:

 Traceback(most recent call last):
    FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
      execccodeinenvironment
    FileC:/dev/web2py/applications/infocenter/controllers/administration.py  
 http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
    FileC:\dev\web2py\gluon\globals.py,line172,inlambda
      self._caller=lambdaf:f()
    FileC:\dev\web2py\gluon\tools.py,line2530,inf
      returnaction(*a, **b)
    FileC:/dev/web2py/applications/infocenter/controllers/administration.py  
 http://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
      paginate=15,maxtextlength=45)
    FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
      user_signature=user_signature,**kwargs)
    FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
      iflink(row):
    FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
      args=request.args[:nargs]+[args0,row.id])))
    FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
      return self[key]
    FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
      returndict.__getitem__(self,key)
 KeyError:'id'

 If the table doesn't have any fields referencing other tables, then it
 works fine.

 Is it just me?

      -Jim


Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-19 Thread Jim Steil

Yes, my tables are all similar to this:


assetType = db.define_table('assetType',
Field('assetTypeId', 'id'),
Field('name', length=50, required=True, unique=True),
format='%(name)s')


-Jim

On 1/19/2012 11:34 AM, Massimo Di Pierro wrote:

Do the tables have id fields called other than id?

On Jan 19, 10:45 am, Jim Steilj...@qlf.com  wrote:

Hi

Just updated to the latest trunk this morning and now my smartgrids
aren't working where the table being used has links.

Here is what I'm getting:

Traceback(most recent call last):
FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
  execccodeinenvironment

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
FileC:\dev\web2py\gluon\globals.py,line172,inlambda
  self._caller=lambdaf:f()
FileC:\dev\web2py\gluon\tools.py,line2530,inf
  returnaction(*a, **b)

FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
  paginate=15,maxtextlength=45)
FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
  user_signature=user_signature,**kwargs)
FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
  iflink(row):
FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
  args=request.args[:nargs]+[args0,row.id])))
FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
  return self[key]
FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
  returndict.__getitem__(self,key)
KeyError:'id'

If the table doesn't have any fields referencing other tables, then it
works fine.

Is it just me?

  -Jim


[web2py] Re: Problem with .smartgrid on tables with links

2012-01-19 Thread Massimo Di Pierro
Now I know where to look for the fix. :-)

On Jan 19, 12:58 pm, Jim Steil j...@qlf.com wrote:
 Yes, my tables are all similar to this:

 assetType = db.define_table('assetType',
              Field('assetTypeId', 'id'),
              Field('name', length=50, required=True, unique=True),
              format='%(name)s')

      -Jim

 On 1/19/2012 11:34 AM, Massimo Di Pierro wrote:







  Do the tables have id fields called other than id?

  On Jan 19, 10:45 am, Jim Steilj...@qlf.com  wrote:
  Hi

  Just updated to the latest trunk this morning and now my smartgrids
  aren't working where the table being used has links.

  Here is what I'm getting:

  Traceback(most recent call last):
      FileC:\dev\web2py\gluon\restricted.py,line204,inrestricted
        execccodeinenvironment
      
  FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line1816,inmodule
      FileC:\dev\web2py\gluon\globals.py,line172,inlambda
        self._caller=lambdaf:f()
      FileC:\dev\web2py\gluon\tools.py,line2530,inf
        returnaction(*a, **b)
      
  FileC:/dev/web2py/applications/infocenter/controllers/administration.pyhttp://127.0.0.1:8000/admin/default/edit/infocenter/controllers/admin...,line457,inassetTypes
        paginate=15,maxtextlength=45)
      FileC:\dev\web2py\gluon\sqlhtml.py,line1971,insmartgrid
        user_signature=user_signature,**kwargs)
      FileC:\dev\web2py\gluon\sqlhtml.py,line1819,ingrid
        iflink(row):
      FileC:\dev\web2py\gluon\sqlhtml.py,line1968,inlambda
        args=request.args[:nargs]+[args0,row.id])))
      FileC:\dev\web2py\gluon\dal.py,line4996,in__getattr__
        return self[key]
      FileC:\dev\web2py\gluon\dal.py,line4987,in__getitem__
        returndict.__getitem__(self,key)
  KeyError:'id'

  If the table doesn't have any fields referencing other tables, then it
  works fine.

  Is it just me?

        -Jim