Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- to_log_api_call = True
- tb = u'UNHANDLED EXCEPTION (2012-08-08 15:36:46.328060)\nWorking directory: /usr/local/noc\n<class \'django.db.utils.IntegrityError\'
- >\nduplicate key value violates unique constraint "vc_vc_vc_domain_id_21725b7fb0adaf81_uniq"\nDETAIL: Key (vc_domain_id, name)=(12, ForUnico-client) a
- lready exists.\n\nSTART OF TRACEBACK\n------------------------------------------------------------------------\nFile: /usr/local/noc/contrib/lib/django
- /db/backends/postgresql_psycopg2/base.py (Line: 44)\nFunction: execute\n 37 """\n 38 \n 39 def __init__(self, cursor):\n 40
- self.cursor = cursor\n 41 \n 42 def execute(self, query, args=None):\n 43 try:\n 44 ==> return
- self.cursor.execute(query, args)\n 45 except Database.IntegrityError, e:\n 46 raise utils.IntegrityError, utils.Integr
- ityError(*tuple(e)), sys.exc_info()[2]\n 47 except Database.DatabaseError, e:\n 48 raise utils.DatabaseError, utils.Dat
- abaseError(*tuple(e)), sys.exc_info()[2]\n 49 \n 50 def executemany(self, query, args):\nVariables:\n query = \'INSERT IN
- TO "vc_vc" ("vc_domain_id", "name", "state_id", "l1", "l2", "description", "style_id", "tags") VALUES (%s, %s, %s, %s, %s, %s, %s, %s)\'\n
- self = <django.db.backends.postgresql_psycopg2.base.CursorWrapper object at 0x808e5c290>\n args = (12, \'ForUnico-client\', 1, 935, 0
- , \'\', None, \'\')\n e = IntegrityError(\'duplicate key value violates unique constraint "vc_vc_vc_domain_id_21725b7fb0adaf81_uniq"\
- \nDETAIL: Key (vc_domain_id, name)=(12, ForUnico-client) already exists.\\n\',)\n---------------------------------------------------------------------
- ---\nFile: /usr/local/noc/contrib/lib/django/db/backends/util.py (Line: 34)\nFunction: execute\n 27 \n 28 \n 29 class CursorDebugWrap
- per(CursorWrapper):\n 30 \n 31 def execute(self, sql, params=()):\n 32 start = time()\n 33 try:\n 34 ==>
- return self.cursor.execute(sql, params)\n 35 finally:\n 36 stop = time()\n 37 duration =
- stop - start\n 38 sql = self.db.ops.last_executed_query(self.cursor, sql, params)\n 39 self.db.queries.append({\n
- 40 \'sql\': sql,\nVariables:\n self = <django.db.backends.util.CursorDebugWrapper object at 0x808e5c0d0>\n
- stop = 1344425806.327764\n start = 1344425806.299079\n params = (12, \'ForUnico-client\', 1, 935, 0, \'\', None, \'\'
- )\n sql = \'INSERT INTO "vc_vc" ("vc_domain_id", "name", "state_id", "l1", "l2", "description", "style_id", "tags") VALUES (12, E\\\'Fo
- rUnico-client\\\', 1, 935, 0, E\\\'\\\', NULL, E\\\'\\\')\'\n duration = 0.02868509292602539\n----------------------------------------------
- --------------------------\nFile: /usr/local/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 735)\nFunction: execute_sql\n 728 exc
- ept EmptyResultSet:\n 729 if result_type == MULTI:\n 730 return empty_iter()\n 731 else:\n 732
- return\n 733 \n 734 cursor = self.connection.cursor()\n 735 ==> cursor.execute(sql, params)\n 736 \
- n 737 if not result_type:\n 738 return cursor\n 739 if result_type == SINGLE:\n 740 if self
- .query.ordering_aliases:\n 741 return cursor.fetchone()[:-len(self.query.ordering_aliases)]\nVariables:\n cursor = <d
- jango.db.backends.util.CursorDebugWrapper object at 0x808e5c0d0>\n self = <django.db.models.sql.compiler.SQLInsertCompiler object at 0x8
- 08e5cc50>\n params = (12, \'ForUnico-client\', 1, 935, 0, \'\', None, \'\')\n result_type = None\n sql = \'INSERT
- INTO "vc_vc" ("vc_domain_id", "name", "state_id", "l1", "l2", "description", "style_id", "tags") VALUES (%s, %s, %s, %s, %s, %s, %s, %s)\'\n-----------
- -------------------------------------------------------------\nFile: /usr/local/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 791)\nFunction:
- execute_sql\n 784 r_fmt, r_params = self.connection.ops.return_insert_id()\n 785 result.append(r_fmt % col)\n 786
- params = params + r_params\n 787 return \' \'.join(result), params\n 788 \n 789 def execute_sql(self, return_
- id=False):\n 790 self.return_id = return_id\n 791 ==> cursor = super(SQLInsertCompiler, self).execute_sql(None)\n 792
- if not (return_id and cursor):\n 793 return\n 794 if self.connection.features.can_return_id_from_insert:\n 795
- return self.connection.ops.fetch_returned_insert_id(cursor)\n 796 return self.connection.ops.last_insert_id(cursor,\n 797
- self.query.model._meta.db_table, self.query.model._meta.pk.column)\nVariables:\n self = <django.db.models.sql.compiler.SQL
- InsertCompiler object at 0x808e5cc50>\n return_id = True\n------------------------------------------------------------------------\nFile: /us
- r/local/noc/contrib/lib/django/db/models/query.py (Line: 1436)\nFunction: insert_query\n 1429 """\n 1430 Inserts a new record for the g
- iven model. This provides an interface to\n 1431 the InsertQuery class and is how Model.save() is implemented. It is not\n 1432 part of
- the public API.\n 1433 """\n 1434 query = sql.InsertQuery(model)\n 1435 query.insert_values(values, raw_values)\n 1436 ==>
- return query.get_compiler(using=using).execute_sql(return_id)\n\nVariables:\n
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement