My code is erroring and it looks like the culprit is the logging of an 
auth_event. It's happening on a lightly customized auth_user Profile update.



Traceback (most recent call last):
  File "/opt/web2py/gluon/restricted.py", line 204, in restricted
    exec ccode in environment
  File "/opt/web2py/applications/init/controllers/default.py" 
<https://pricetack.com/admin/edit/init/controllers/default.py>, line 133, in 
<module>
  File "/opt/web2py/gluon/globals.py", line 172, in <lambda>
    self._caller = lambda f: f()
  File "/opt/web2py/applications/init/controllers/default.py" 
<https://pricetack.com/admin/edit/init/controllers/default.py>, line 85, in user
    form = auth()
  File "/opt/web2py/gluon/tools.py", line 1159, in __call__
    return getattr(self,args[0])()
  File "/opt/web2py/gluon/tools.py", line 2431, in profile
    onvalidation=onvalidation, hideerror=self.settings.hideerror):
  File "/opt/web2py/gluon/sqlhtml.py", line 1088, in accepts
    hideerror=hideerror,
  File "/opt/web2py/gluon/html.py", line 1807, in accepts
    status = self._traverse(status,hideerror)
  File "/opt/web2py/gluon/html.py", line 749, in _traverse
    newstatus = c._traverse(status,hideerror) and newstatus
  File "/opt/web2py/gluon/html.py", line 749, in _traverse
    newstatus = c._traverse(status,hideerror) and newstatus
  File "/opt/web2py/gluon/html.py", line 749, in _traverse
    newstatus = c._traverse(status,hideerror) and newstatus
  File "/opt/web2py/gluon/html.py", line 749, in _traverse
    newstatus = c._traverse(status,hideerror) and newstatus
  File "/opt/web2py/gluon/html.py", line 756, in _traverse
    newstatus = self._validate()
  File "/opt/web2py/gluon/html.py", line 1572, in _validate
    (value, errors) = validator(value)
  File "/opt/web2py/gluon/validators.py", line 549, in __call__
    elif str(rows[0]._id) != str(self.record_id):
  File "/opt/web2py/gluon/dal.py", line 5459, in __getattr__
    return self[key]
  File "/opt/web2py/gluon/dal.py", line 5450, in __getitem__
    return dict.__getitem__(self, key)
KeyError: '_id'



Function argument list

(self=<Row {'auth_event': <gluon.dal.Set object at 0x2...embership': 
<gluon.dal.Set object at 0x2207210>}>, key='_id')
Code listing

5445.
5446.
5447.
5448.
5449.
5450.

5451.
5452.
5453.
5454.

        elif m:
            try:
                return dict.__getitem__(self, m.group(1))[m.group(2)]
            except (KeyError,TypeError):
                key = m.group(2)
        return dict.__getitem__(self, key)


    def __call__(self,key):
        return self.__getitem__(key)

Variablesself<Row {'auth_event': <gluon.dal.Set object at 0x2...embership': 
<gluon.dal.Set object at 0x2207210>}>dict.__getitem__<method '__getitem__' 
of 'dict' objects>builtindict<type 'dict'>key'_id'

Reply via email to