openlabs/poweremail — Issue #16: Error #2 downloading Full Mail
Author: Naghual
Created: 2012-02-07 14:50:50+00:00
State: open

tracelog:

[2012-02-07 16:49:30,612][openerp] INFO:Power Email:Starting Full mail reception for mail: 12.
[2012-02-07 16:49:30,627][openerp] INFO:Power Email:POP3 Server Connected & logged in successfully Account: 12.
[2012-02-07 16:49:30,630][openerp] INFO:Power Email:POP3 Statistics: 126 mails of 121716472 size for Account: 12:
[2012-02-07 16:49:31,138][openerp] INFO:Power Email:Mail 124 Saved successfully as ID: True for Account: 12.
[2012-02-07 16:49:31,177][openerp] INFO:Power Email:Downloaded & saved 1 attachments Account: 12.
[2012-02-07 16:49:31,180][openerp] ERROR:db.cursor:bad query: insert into mail_attachments_rel (mail_id,att_id) values (412, 28)
Traceback (most recent call last):
File "/opt/openerp/lib/python2.7/site-packages/openerp-server/sql_db.py", line 131, in execute
res = self._obj.execute(query, params)
IntegrityError: insert or update on table "mail_attachments_rel" violates foreign key constraint "mail_attachments_rel_mail_id_fkey"
ПОДРОБНО: Key (mail_id)=(412) is not present in table "email_template_mailbox".

> /opt/openerp/lib/python2.7/site-packages/openerp-server/sql_db.py(131)execute()
-> res = self._obj.execute(query, params)
(Pdb)

code:

(Pdb) l
134	self.__logger.error("Programming error: %s, in query %s", pe, query)
135	raise
136	except Exception:
137	if log_exceptions:
138	self.__logger.exception("bad query: %s", self._obj.query or query)
139 ->	raise
140
141	if self.sql_log:
142	delay = mdt.now() - now
143	delay = delay.seconds * 1E6 + delay.microseconds
144
(Pdb)