AttributeError: 'NoneType' object has no attribute 'doc_id' - during 'delete_doc' from the sqlite backend
This error occurs during the deletion of the mail from the sqlite database. The following are the logs for the error with the stack-trace :
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: 2017-03-20 17:59:48 [twisted.internet.defer] CRITICAL Unhandled error in Deferred:
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: 2017-03-20 17:59:48 [twisted.internet.defer] CRITICAL
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: Traceback (most recent call last):
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: self.run()
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/lib/python2.7/threading.py", line 763, in run
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: self.__target(*self.__args, **self.__kwargs)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/_threads/_threadworker.py", line 46, in work
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: task()
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/_threads/_team.py", line 190, in doWork
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: task()
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: --- <exception caught here> ---
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 246, in inContext
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: result = inContext.theWork()
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 262, in <lambda>
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: return self.currentContext().callWithContext(ctx, func, *args, **kw)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: return func(*args,**kw)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/src/leap.soledad.client/client/src/leap/soledad/client/adbapi.py", line 269, in _runIntera
ction
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: result = interaction(trans, *args, **kw)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/src/leap.soledad.client/client/src/leap/soledad/client/adbapi.py", line 236, in _runU1DBQu
ery
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: return meth(*args, **kw)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: File "/usr/share/python/pixelated-user-agent/src/leap.soledad.common/common/src/leap/soledad/common/l2db/backends/sqlite_backend.py", l
ine 447, in delete_doc
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: old_doc = self._get_doc(doc.doc_id, check_for_conflicts=True)
Mar 20 17:59:48 pixelated pixelated-user-agent[26826]: exceptions.AttributeError: 'NoneType' object has no attribute 'doc_id'