apycot #2055422 IndexError: tuple index out of range (/entities.py", line 380, in environment, return self.using_environment[0]) [deprecated]

Seen in the server logs

2011-10-25 14:46:35 - (cubicweb.repository) ERROR: unexpected error while executing SET X endtime %(endtime)s,X execution_status %(execution_status)s WHERE X eid %(x)s with {'x': 193580, 'endtime': datetime.datetime(2011, 10, 25, 14, 46, 35, 274776), 'execution_status': u'failed'}
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/cubicweb/server/repository.py", line 723, in execute
  build_descr)
File "/usr/lib/python2.6/dist-packages/cubicweb/server/querier.py", line 731, in execute
  results = plan.execute()
File "/usr/lib/python2.6/dist-packages/cubicweb/server/querier.py", line 202, in execute
  result = step.execute()
File "/usr/lib/python2.6/dist-packages/cubicweb/server/ssplanner.py", line 584, in execute
  repo.glob_update_entity(session, edited)
File "/usr/lib/python2.6/dist-packages/cubicweb/server/repository.py", line 1353, in glob_update_entity
  hm.call_hooks('before_update_entity', session, entity=entity)
File "/usr/lib/python2.6/dist-packages/cubicweb/server/hook.py", line 415, in call_hooks
  registry.call_hooks(event, session, **kwargs)
File "/usr/lib/python2.6/dist-packages/cubicweb/server/hook.py", line 337, in call_hooks
  hook()
File "/usr/share/cubicweb/cubes/apycot/hooks.py", line 268, in __call__
  if 'endtime' in entity.cw_edited and entity.status_changes():
File "/usr/lib/pymodules/python2.6/logilab/common/decorators.py", line 64, in wrapped
  return self.__call__(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/logilab/common/decorators.py", line 58, in __call__
  value = __me.callable(self, *args)
File "/usr/share/cubicweb/cubes/apycot/entities.py", line 413, in status_changes
  previous_exec = self.previous_execution()
File "/usr/share/cubicweb/cubes/apycot/entities.py", line 398, in previous_execution
  'tc': self.configuration.eid, 'pe': self.environment.eid})
File "/usr/share/cubicweb/cubes/apycot/entities.py", line 380, in environment
  return self.using_environment[0]
IndexError: tuple index out of range
prioritynormal
typebug
done in<not specified>
load0.000
load left0.000
closed by<not specified>