winfried / HelpIM

*obsoleted* An chat-system for online psycho-social counselling
11 stars 3 forks source link

IntegrityError in bot, duplicate key #276

Open winfried opened 11 years ago

winfried commented 11 years ago

Quite a rare error, but (september 3rd, 2013) present:

Traceback (most recent call last): File "/usr/local/bin/django-admin.py", line 5, in management.execute_from_command_line() File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 429, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(_args, _options.dict) File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 220, in execute output = self.handle(_args, _options) File "/usr/local/lib/python2.6/dist-packages/helpim/rooms/management/commands/runbot.py", line 92, in handle bot.run() File "/usr/local/lib/python2.6/dist-packages/helpim/rooms/bot.py", line 1058, in run busy = self.stream.loop_iter(eventTimeout) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 598, in loop_iter return self._loop_iter(timeout) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 619, in _loop_iter self._process() File "/usr/lib/pymodules/python2.6/pyxmpp/streamtls.py", line 193, in _process StreamBase._process(self) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 640, in _process self._read() File "/usr/lib/pymodules/python2.6/pyxmpp/streamtls.py", line 188, in _read StreamBase._read(self) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 664, in _read self._feed_reader(r) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 680, in _feed_reader r=self._reader.feed(data) File "/usr/lib/pymodules/python2.6/pyxmpp/xmlextra.py", line 549, in feed r = self.reader.feed(s) File "/usr/lib/pymodules/python2.6/pyxmpp/xmlextra.py", line 57, in _stanza self.stanza(doc,node) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 401, in stanza self._process_node(node) File "/usr/lib/pymodules/python2.6/pyxmpp/stream.py", line 107, in _process_node StreamBase._process_node(self,xmlnode) File "/usr/lib/pymodules/python2.6/pyxmpp/streambase.py", line 713, in _process_node self.process_stanza(stanza) File "/usr/lib/pymodules/python2.6/pyxmpp/stanzaprocessor.py", line 273, in process_stanza if self.process_iq(stanza): File "/usr/lib/pymodules/python2.6/pyxmpp/stanzaprocessor.py", line 122, in process_iq response = res_handler(stanza) File "/usr/local/lib/python2.6/dist-packages/helpim/rooms/bot.py", line 524, in result_handler=lambda stanza: self.__create_conversation_form_entry(stanza, position)) File "/usr/local/lib/python2.6/dist-packages/helpim/rooms/bot.py", line 566, in __create_conversation_form_entry position = position) File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 138, in create return self.get_query_set().create(_kwargs) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 360, in create obj.save(force_insert=True, using=self.db) File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 460, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 553, in save_base result = manager._insert(values, return_id=update_pk, using=using) File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 195, in _insert return insert_query(self.model, values, _kwargs) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 1436, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py", line 791, in execute_sql cursor = super(SQLInsertCompiler, self).execute_sql(None) File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py", line 735, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.6/dist-packages/django/db/backends/mysql/base.py", line 86, in execute return self.cursor.execute(query, args) File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute self.errorhandler(self, exc, value) File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue django.db.utils.IntegrityError: (1062, "Duplicate entry '269-CA' for key 'questionnaire_conversationformentr_conversation_id_27da32b_uniq'")