Advertisement
Guest User

Untitled

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