Insert Failed: Insufficient data left in message

1,299 views
Skip to first unread message

at

unread,
Nov 7, 2013, 2:36:52 AM11/7/13
to web...@googlegroups.com
Hi,

Occationally an error is reported stating following problem:
"/home/www-data/web2py/gluon/dal.py", line 8514, in insert\n    ret =  self._db._adapter.insert(self, self._listify(fields))\n  File "/home/www-data/web2py/gluon/dal.py", line 1206, in insert\n    raise e\nProgrammingError: (\'ERROR\', \'08P01\', \'insufficient data left in message\')\n'

and Postgresql logs: 'insufficient data left in message'.

Here is the insert command on which we get this err:
db.my_table.insert(status=status,
                       type
=type,
                       created
=datetime.now,
                       updated
=datetime.now,
                       recipient
=recipient,
                       recipient_username
=recipient_username,
                       sender_username
=sender_username,
                       subject
=subject,
                       message
=message,
                       admission
=admission)



and table defination:
db.define_table('my_table',
   
Field('status', type='string', length=32),
   
Field('type', type='string', length=7),
   
Field('admission', type='integer'),
   
Field('sender_username', type='string', length=32),
   
Field('recipient', type='string', length=64),
   
Field('recipient_username', type='string', length=64),
   
Field('subject', type='string', length=50),
   
Field('message', type='text'),
   
Field('created', type='datetime', default=request.now, writable=False ),
   
Field('updated', type='datetime', default=request.now, writable=False ),
)


Any idea what might be the issue?

Thanks a lot.

Paolo Valleri

unread,
Nov 7, 2013, 2:41:55 AM11/7/13
to web...@googlegroups.com
have you checked the variables content of a failure?
Paolo

at

unread,
Nov 7, 2013, 2:58:46 AM11/7/13
to web...@googlegroups.com
Yes except datetime fields; the all inserted values seem to be ok and datetime fields are evaluated by datetime.now
AT

Derek

unread,
Nov 7, 2013, 1:32:16 PM11/7/13
to web...@googlegroups.com
It's a pervasive specific error, try seeing if there are any 0x00 characters in the 'message'. 

Reply all
Reply to author
Forward
0 new messages