Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2013-11-19 21:38:13.331281)
- Working directory: /opt/noc
- <type 'exceptions.AttributeError'>
- 'NoneType' object has no attribute 'get_model_connection'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/inv/apps/objectmodel/views.py (Line: 50)
- Function: api_compatible
- 43 # Connections
- 44 r = []
- 45 for c in o.connections:
- 46 # Find compatible objects
- 47 proposals = []
- 48 for t, n in o.get_connection_proposals(c.name):
- 49 m = ObjectModel.objects.filter(id=t).first()
- 50 ==> mc = m.get_model_connection(n)
- 51 proposals += [{
- 52 "model": m.name,
- 53 "model_description": m.description,
- 54 "name": n,
- 55 "description": mc.description,
- 56 "gender": mc.gender
- Variables:
- c = <ObjectModelConnection: in>
- m = None
- self =
- <noc.inv.apps.objectmodel.views.ObjectModelApplication object at 0x80d745050>
- proposals = []
- request =
- <WSGIRequest
- path:/inv/objectmodel/528ba143f3b682005d9788a1/compatible/,
- GET:<QueryDict: {u'_dc': [u'1384882699120']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': 'IE6aNOYA3mfrxpOJUvlG5H9owwYjbZke',
- 'sessionid': '3ded034749730c8f7fa8e5fd5040c44a'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=IE6aNOYA3mfrxpOJUvlG5H9owwYjbZke; sessionid=3ded034749730c8f7fa8e5fd5040c44a',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'PATH_INFO': u'/inv/objectmodel/528ba143f3b682005d9788a1/compatible/',
- 'QUERY_STRING': '_dc=1384882699120',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- '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 0x807425ed0>,
- 'wsgi.input': <_io.BytesIO object at 0x80e0508f0>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- o = <ObjectModel: Avago | Transceiver | 1G | SFP LH>
- n = u'ge-X/0/0'
- r = []
- t = ObjectId('5252af05f3b6820cefcee335')
- id = u'528ba143f3b682005d9788a1'
- ------------------------------------------------------------------------
- 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 =
- {'GET': <bound method ObjectModelApplication.api_compatible of <noc.inv.apps.objectmodel.views.ObjectModelApplication object at 0x80d745050>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x80a0d2050>
- v =
- <bound method ObjectModelApplication.api_compatible of <noc.inv.apps.objectmodel.views.ObjectModelApplication object at 0x80d745050>>
- request =
- <WSGIRequest
- path:/inv/objectmodel/528ba143f3b682005d9788a1/compatible/,
- GET:<QueryDict: {u'_dc': [u'1384882699120']}>,
- POST:<QueryDict: {}>,
- COOKIES:{'csrftoken': 'IE6aNOYA3mfrxpOJUvlG5H9owwYjbZke',
- 'sessionid': '3ded034749730c8f7fa8e5fd5040c44a'},
- META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'csrftoken=IE6aNOYA3mfrxpOJUvlG5H9owwYjbZke; sessionid=3ded034749730c8f7fa8e5fd5040c44a',
- 'HTTP_DNT': '1',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'PATH_INFO': u'/inv/objectmodel/528ba143f3b682005d9788a1/compatible/',
- 'QUERY_STRING': '_dc=1384882699120',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'GET',
- '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 0x807425ed0>,
- 'wsgi.input': <_io.BytesIO object at 0x80e0508f0>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- to_log_api_call = False
- kwargs = {'id': u'528ba143f3b682005d9788a1'}
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- app =
- <noc.inv.apps.objectmodel.views.ObjectModelApplication object at 0x80d745050>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement