Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [16:19:16.492] Ext.Error: You're trying to decode an invalid JSON String: UNHANDLED EXCEPTION (2012-10-25 16:19:16.234067)
- Working directory: /opt/noc
- <class 'bson.errors.InvalidDocument'>
- Cannot encode object: <Style: FM MINOR>
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: build/bdist.freebsd-8.2-RELEASE-amd64/egg/pymongo/cursor.py (Line: 666)
- Function: _refresh
- 659 else:
- 660 ntoreturn = self.__limit
- 661 self.__send_message(
- 662 message.query(self.__query_options(),
- 663 self.__collection.full_name,
- 664 self.__skip, ntoreturn,
- 665 self.__query_spec(), self.__fields,
- 666 ==> self.__uuid_subtype))
- 667 if not self.__id:
- 668 self.__killed = True
- 669 elif self.__id: # Get More
- 670 if self.__limit:
- 671 limit = self.__limit - self.__retrieved
- 672 if self.__batch_size:
- Variables:
- self = <pymongo.cursor.Cursor object at 0x80aa0a590>
- ntoreturn = 2
- ------------------------------------------------------------------------
- File: build/bdist.freebsd-8.2-RELEASE-amd64/egg/pymongo/cursor.py (Line: 703)
- Function: next
- 696 def __iter__(self):
- 697 return self
- 698
- 699 def next(self):
- 700 if self.__empty:
- 701 raise StopIteration
- 702 db = self.__collection.database
- 703 ==> if len(self.__data) or self._refresh():
- 704 if self.__manipulate:
- 705 return db._fix_outgoing(self.__data.pop(0), self.__collection)
- 706 else:
- 707 return self.__data.pop(0)
- 708 else:
- 709 raise StopIteration
- Variables:
- self = <pymongo.cursor.Cursor object at 0x80aa0a590>
- db = Database(Connection('localhost', 27017), u'noc')
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/mongoengine-0.6.20-py2.7.egg/mongoengine/queryset.py (Line: 979)
- Function: next
- 972 self._iter = True
- 973 try:
- 974 if self._limit == 0:
- 975 raise StopIteration
- 976 if self._scalar:
- 977 return self._get_scalar(self._document._from_son(
- 978 self._cursor.next()))
- 979 ==> return self._document._from_son(self._cursor.next())
- 980 except StopIteration, e:
- 981 self.rewind()
- 982 raise e
- 983
- 984 def rewind(self):
- 985 """Rewind the cursor to its unevaluated state.
- Variables:
- self = .. queryset mid-iteration ..
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/mongoengine-0.6.20-py2.7.egg/mongoengine/queryset.py (Line: 799)
- Function: get
- 792 if no results are found.
- 793
- 794 .. versionadded:: 0.3
- 795 """
- 796 self.limit(2)
- 797 self.__call__(*q_objs, **query)
- 798 try:
- 799 ==> result1 = self.next()
- 800 except StopIteration:
- 801 raise self._document.DoesNotExist("%s matching query does not exist."
- 802 % self._document._class_name)
- 803 try:
- 804 result2 = self.next()
- 805 except StopIteration:
- Variables:
- query = {'style': <Style: FM MINOR>, 'mac_discovery': False, 'description': '', 'name': '123', 'link_events': 'A'}
- self = .. queryset mid-iteration ..
- q_objs = ()
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/extdocapplication.py (Line: 163)
- Function: api_create
- 156 try:
- 157 attrs = self.clean(self.deserialize(request.raw_post_data))
- 158 except ValueError, why:
- 159 return self.response(str(why), status=self.BAD_REQUEST)
- 160 if "id" in attrs:
- 161 del attrs["id"]
- 162 try:
- 163 ==> self.queryset(request).get(**attrs)
- 164 return self.response(status=self.CONFLICT)
- 165 except self.model.MultipleObjectsReturned:
- 166 return self.response(status=self.CONFLICT)
- 167 except self.model.DoesNotExist:
- 168 o = self.model(**attrs)
- 169 o.save()
- Variables:
- self = <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>
- request = <WSGIRequest
- path:/inv/interfaceprofile/,
- GET:<QueryDict: {u'_dc': [u'1351167556226'], u'__format': [u'ext']}>,
- POST:<QueryDict: {u'{"id":"","description":"","name":"123","style":3,"link_events":"A","mac_discovery":false}': [u'']}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
- META:{'CONTENT_LENGTH': '89',
- 'CONTENT_TYPE': 'application/json; charset=UTF-8',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CACHE_CONTROL': 'no-cache',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_PRAGMA': 'no-cache',
- 'HTTP_REFERER': 'http://noc/main/desktop/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0',
- 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
- 'PATH_INFO': u'/inv/interfaceprofile/',
- 'QUERY_STRING': '_dc=1351167556226&__format=ext',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80aa3fe30>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- attrs = {'description': '', 'style': <Style: FM MINOR>, 'link_events': 'A', 'name': '123', 'mac_discovery': False}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 232)
- Function: inner
- 225 for k, v in request.POST.lists())
- 226 elif request.method == "GET":
- 227 a = dict((k, v[0] if len(v) == 1 else v)
- 228 for k, v in request.GET.lists())
- 229 logging.debug("API %s %s %s" % (request.method,
- 230 request.path, a))
- 231 # Call handler
- 232 ==> r = v(request, *args, **kwargs)
- 233 # Dump SQL statements
- 234 if self.log_sql_statements:
- 235 from django.db import connections
- 236 tsc = 0
- 237 sc = defaultdict(int)
- 238 for conn in connections.all():
- Variables:
- args = ()
- 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>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x8066e50d0>
- v = <bound method InterfaceProfileApplication.api_create of <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>>
- request = <WSGIRequest
- path:/inv/interfaceprofile/,
- GET:<QueryDict: {u'_dc': [u'1351167556226'], u'__format': [u'ext']}>,
- POST:<QueryDict: {u'{"id":"","description":"","name":"123","style":3,"link_events":"A","mac_discovery":false}': [u'']}>,
- COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
- 'sessionid': 'f1a3679ef1dfea48c2cc54489d8b790d'},
- META:{'CONTENT_LENGTH': '89',
- 'CONTENT_TYPE': 'application/json; charset=UTF-8',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CACHE_CONTROL': 'no-cache',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=f1a3679ef1dfea48c2cc54489d8b790d',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_PRAGMA': 'no-cache',
- 'HTTP_REFERER': 'http://noc/main/desktop/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0',
- 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
- 'PATH_INFO': u'/inv/interfaceprofile/',
- 'QUERY_STRING': '_dc=1351167556226&__format=ext',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8044bc0c0>,
- 'wsgi.input': <_io.BytesIO object at 0x80aa3fe30>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- to_log_api_call = False
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- kwargs = {}
- app = <noc.inv.apps.interfaceprofile.views.InterfaceProfileApplication object at 0x8087d97d0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment