Guest User

Untitled

a guest
Oct 25th, 2012
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.33 KB | None | 0 0
  1. [16:19:16.492] Ext.Error: You're trying to decode an invalid JSON String: UNHANDLED EXCEPTION (2012-10-25 16:19:16.234067)
  2. Working directory: /opt/noc
  3. <class 'bson.errors.InvalidDocument'>
  4. Cannot encode object: <Style: FM MINOR>
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: build/bdist.freebsd-8.2-RELEASE-amd64/egg/pymongo/cursor.py (Line: 666)
  8. Function: _refresh
  9. 659 else:
  10. 660 ntoreturn = self.__limit
  11. 661 self.__send_message(
  12. 662 message.query(self.__query_options(),
  13. 663 self.__collection.full_name,
  14. 664 self.__skip, ntoreturn,
  15. 665 self.__query_spec(), self.__fields,
  16. 666 ==> self.__uuid_subtype))
  17. 667 if not self.__id:
  18. 668 self.__killed = True
  19. 669 elif self.__id: # Get More
  20. 670 if self.__limit:
  21. 671 limit = self.__limit - self.__retrieved
  22. 672 if self.__batch_size:
  23. Variables:
  24. self = <pymongo.cursor.Cursor object at 0x80aa0a590>
  25. ntoreturn = 2
  26. ------------------------------------------------------------------------
  27. File: build/bdist.freebsd-8.2-RELEASE-amd64/egg/pymongo/cursor.py (Line: 703)
  28. Function: next
  29. 696 def __iter__(self):
  30. 697 return self
  31. 698
  32. 699 def next(self):
  33. 700 if self.__empty:
  34. 701 raise StopIteration
  35. 702 db = self.__collection.database
  36. 703 ==> if len(self.__data) or self._refresh():
  37. 704 if self.__manipulate:
  38. 705 return db._fix_outgoing(self.__data.pop(0), self.__collection)
  39. 706 else:
  40. 707 return self.__data.pop(0)
  41. 708 else:
  42. 709 raise StopIteration
  43. Variables:
  44. self = <pymongo.cursor.Cursor object at 0x80aa0a590>
  45. db = Database(Connection('localhost', 27017), u'noc')
  46. ------------------------------------------------------------------------
  47. File: /opt/noc/contrib/lib/mongoengine-0.6.20-py2.7.egg/mongoengine/queryset.py (Line: 979)
  48. Function: next
  49. 972 self._iter = True
  50. 973 try:
  51. 974 if self._limit == 0:
  52. 975 raise StopIteration
  53. 976 if self._scalar:
  54. 977 return self._get_scalar(self._document._from_son(
  55. 978 self._cursor.next()))
  56. 979 ==> return self._document._from_son(self._cursor.next())
  57. 980 except StopIteration, e:
  58. 981 self.rewind()
  59. 982 raise e
  60. 983
  61. 984 def rewind(self):
  62. 985 """Rewind the cursor to its unevaluated state.
  63. Variables:
  64. self = .. queryset mid-iteration ..
  65. ------------------------------------------------------------------------
  66. File: /opt/noc/contrib/lib/mongoengine-0.6.20-py2.7.egg/mongoengine/queryset.py (Line: 799)
  67. Function: get
  68. 792 if no results are found.
  69. 793
  70. 794 .. versionadded:: 0.3
  71. 795 """
  72. 796 self.limit(2)
  73. 797 self.__call__(*q_objs, **query)
  74. 798 try:
  75. 799 ==> result1 = self.next()
  76. 800 except StopIteration:
  77. 801 raise self._document.DoesNotExist("%s matching query does not exist."
  78. 802 % self._document._class_name)
  79. 803 try:
  80. 804 result2 = self.next()
  81. 805 except StopIteration:
  82. Variables:
  83. query = {'style': <Style: FM MINOR>, 'mac_discovery': False, 'description': '', 'name': '123', 'link_events': 'A'}
  84. self = .. queryset mid-iteration ..
  85. q_objs = ()
  86. ------------------------------------------------------------------------
  87. File: /opt/noc/lib/app/extdocapplication.py (Line: 163)
  88. Function: api_create
  89. 156 try:
  90. 157 attrs = self.clean(self.deserialize(request.raw_post_data))
  91. 158 except ValueError, why:
  92. 159 return self.response(str(why), status=self.BAD_REQUEST)
  93. 160 if "id" in attrs:
  94. 161 del attrs["id"]
  95. 162 try:
  96. 163 ==> self.queryset(request).get(**attrs)
  97. 164 return self.response(status=self.CONFLICT)
  98. 165 except self.model.MultipleObjectsReturned:
  99. 166 return self.response(status=self.CONFLICT)
  100. 167 except self.model.DoesNotExist:
  101. 168 o = self.model(**attrs)
  102. 169 o.save()
  103. Variables:
  104. self = <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>
  105. request = <WSGIRequest
  106. path:/inv/interfaceprofile/,
  107. GET:<QueryDict: {u'_dc': [u'1351167556226'], u'__format': [u'ext']}>,
  108. POST:<QueryDict: {u'{"id":"","description":"","name":"123","style":3,"link_events":"A","mac_discovery":false}': [u'']}>,
  109. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  110. 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
  111. META:{'CONTENT_LENGTH': '89',
  112. 'CONTENT_TYPE': 'application/json; charset=UTF-8',
  113. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  114. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  115. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  116. 'HTTP_CACHE_CONTROL': 'no-cache',
  117. 'HTTP_CONNECTION': 'close',
  118. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
  119. 'HTTP_DNT': '1',
  120. 'HTTP_HOST': '127.0.0.1:8000',
  121. 'HTTP_PRAGMA': 'no-cache',
  122. 'HTTP_REFERER': 'http://noc/main/desktop/',
  123. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0',
  124. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  125. 'PATH_INFO': u'/inv/interfaceprofile/',
  126. 'QUERY_STRING': '_dc=1351167556226&__format=ext',
  127. 'REMOTE_ADDR': '127.0.0.1',
  128. 'REQUEST_METHOD': 'POST',
  129. 'SCRIPT_NAME': u'',
  130. 'SERVER_NAME': '127.0.0.1',
  131. 'SERVER_PORT': '8000',
  132. 'SERVER_PROTOCOL': 'HTTP/1.0',
  133. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
  134. 'wsgi.input': <_io.BytesIO object at 0x80aa3fe30>,
  135. 'wsgi.multiprocess': True,
  136. 'wsgi.multithread': False,
  137. 'wsgi.run_once': False,
  138. 'wsgi.url_scheme': 'http',
  139. 'wsgi.version': (1, 0)}>
  140. attrs = {'description': '', 'style': <Style: FM MINOR>, 'link_events': 'A', 'name': '123', 'mac_discovery': False}
  141. ------------------------------------------------------------------------
  142. File: /opt/noc/lib/app/site.py (Line: 232)
  143. Function: inner
  144. 225 for k, v in request.POST.lists())
  145. 226 elif request.method == "GET":
  146. 227 a = dict((k, v[0] if len(v) == 1 else v)
  147. 228 for k, v in request.GET.lists())
  148. 229 logging.debug("API %s %s %s" % (request.method,
  149. 230 request.path, a))
  150. 231 # Call handler
  151. 232 ==> r = v(request, *args, **kwargs)
  152. 233 # Dump SQL statements
  153. 234 if self.log_sql_statements:
  154. 235 from django.db import connections
  155. 236 tsc = 0
  156. 237 sc = defaultdict(int)
  157. 238 for conn in connections.all():
  158. Variables:
  159. args = ()
  160. view_map = {'POST': <bound method InterfaceProfileApplication.api_create of <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>>, 'GET': <bound method InterfaceProfileApplication.api_list of <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>>}
  161. Form = <class 'django.forms.forms.Form'>
  162. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  163. self = <noc.lib.app.site.Site object at 0x8066e50d0>
  164. v = <bound method InterfaceProfileApplication.api_create of <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>>
  165. request = <WSGIRequest
  166. path:/inv/interfaceprofile/,
  167. GET:<QueryDict: {u'_dc': [u'1351167556226'], u'__format': [u'ext']}>,
  168. POST:<QueryDict: {u'{"id":"","description":"","name":"123","style":3,"link_events":"A","mac_discovery":false}': [u'']}>,
  169. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  170. 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
  171. META:{'CONTENT_LENGTH': '89',
  172. 'CONTENT_TYPE': 'application/json; charset=UTF-8',
  173. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  174. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  175. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  176. 'HTTP_CACHE_CONTROL': 'no-cache',
  177. 'HTTP_CONNECTION': 'close',
  178. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
  179. 'HTTP_DNT': '1',
  180. 'HTTP_HOST': '127.0.0.1:8000',
  181. 'HTTP_PRAGMA': 'no-cache',
  182. 'HTTP_REFERER': 'http://noc/main/desktop/',
  183. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0',
  184. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  185. 'PATH_INFO': u'/inv/interfaceprofile/',
  186. 'QUERY_STRING': '_dc=1351167556226&__format=ext',
  187. 'REMOTE_ADDR': '127.0.0.1',
  188. 'REQUEST_METHOD': 'POST',
  189. 'SCRIPT_NAME': u'',
  190. 'SERVER_NAME': '127.0.0.1',
  191. 'SERVER_PORT': '8000',
  192. 'SERVER_PROTOCOL': 'HTTP/1.0',
  193. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
  194. 'wsgi.input': <_io.BytesIO object at 0x80aa3fe30>,
  195. 'wsgi.multiprocess': True,
  196. 'wsgi.multithread': False,
  197. 'wsgi.run_once': False,
  198. 'wsgi.url_scheme': 'http',
  199. 'wsgi.version': (1, 0)}>
  200. to_log_api_call = False
  201. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  202. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  203. kwargs = {}
  204. app = <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>
  205. ------------------------------------------------------------------------
  206. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment