Guest User

Untitled

a guest
Aug 7th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.72 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-08-07 10:21:15.066458)
  2. Working directory: /opt/noc
  3. <type 'exceptions.NameError'>
  4. global name 'VC' is not defined
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/vc/models/vcdomain.py (Line: 67)
  8. Function: get_free_label
  9. 60 else:
  10. 61 chunks = VCFilter.compile(vc_filter.expression)
  11. 62 # Find first free
  12. 63 for x, y in chunks:
  13. 64 if x > y or y < l_min or x > l_max:
  14. 65 continue # Skip chunk outside of type's range
  15. 66 for l in range(max(l_min, x), min(l_max, y) + 1):
  16. 67 ==> if not VC.objects.filter(vc_domain=self, l1=l).exists():
  17. 68 return l # Return first free found
  18. 69 return None # Nothing found
  19. Variables:
  20. l_max = 4095
  21. self = <VCDomain: NN>
  22. vc_filter = <VCFilter: To-sovintel>
  23. l = 2500
  24. chunks = [(2500, 2999)]
  25. y = 2999
  26. x = 2500
  27. l_min = 1
  28. ------------------------------------------------------------------------
  29. File: /opt/noc/vc/apps/vc/views.py (Line: 89)
  30. Function: api_find_free
  31. 82
  32. 83 @view(url="^find_free/$", method=["GET"], access="read", api=True,
  33. 84 validate={
  34. 85 "vc_domain": ModelParameter(VCDomain),
  35. 86 "vc_filter": ModelParameter(VCFilter)
  36. 87 })
  37. 88 def api_find_free(self, request, vc_domain, vc_filter, **kwargs):
  38. 89 ==> return vc_domain.get_free_label(vc_filter)
  39. 90
  40. 91 @view(url="^bulk/import/", method=["POST"], access="import", api=True,
  41. 92 validate={
  42. 93 "vc_domain": ModelParameter(VCDomain),
  43. 94 "items": ListOfParameter(element=DictParameter(attrs={
  44. 95 "l1": IntParameter(),
  45. Variables:
  46. vc_domain = <VCDomain: NN>
  47. self = <noc.vc.apps.vc.views.VCApplication object at 0x80918d050>
  48. vc_filter = <VCFilter: To-sovintel>
  49. request = <WSGIRequest
  50. GET:<QueryDict: {u'vc_domain': [u'16'], u'_dc': [u'1344320454528'], u'vc_filter': [u'14']}>,
  51. POST:<QueryDict: {}>,
  52. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  53. 'sessionid': 'ea43713788bea92af05c2f2957188983'},
  54. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  55. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  56. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  57. 'HTTP_CONNECTION': 'close',
  58. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
  59. 'HTTP_DNT': '1',
  60. 'HTTP_HOST': '127.0.0.1:8000',
  61. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1',
  62. 'PATH_INFO': u'/vc/vc/find_free/',
  63. 'QUERY_STRING': '_dc=1344320454528&vc_domain=16&vc_filter=14',
  64. 'REMOTE_ADDR': '127.0.0.1',
  65. 'REQUEST_METHOD': 'GET',
  66. 'SCRIPT_NAME': u'',
  67. 'SERVER_NAME': '127.0.0.1',
  68. 'SERVER_PORT': '8000',
  69. 'SERVER_PROTOCOL': 'HTTP/1.0',
  70. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040ef5d0>,
  71. 'wsgi.input': <_io.BytesIO object at 0x809d14290>,
  72. 'wsgi.multiprocess': True,
  73. 'wsgi.multithread': False,
  74. 'wsgi.run_once': False,
  75. 'wsgi.url_scheme': 'http',
  76. 'wsgi.version': (1, 0)}>
  77. kwargs = {}
  78. ------------------------------------------------------------------------
  79. File: /opt/noc/lib/app/site.py (Line: 226)
  80. Function: inner
  81. 219 for k, v in request.POST.lists())
  82. 220 elif request.method == "GET":
  83. 221 a = dict((k, v[0] if len(v) == 1 else v)
  84. 222 for k, v in request.GET.lists())
  85. 223 logging.debug("API %s %s %s" % (request.method,
  86. 224 request.path, a))
  87. 225 # Call handler
  88. 226 ==> r = v(request, *args, **kwargs)
  89. 227 # Dump SQL statements
  90. 228 if self.log_sql_statements:
  91. 229 from django.db import connections
  92. 230 tsc = 0
  93. 231 sc = defaultdict(int)
  94. 232 for conn in connections.all():
  95. Variables:
  96. errors = None
  97. view_map = {'GET': <bound method VCApplication.api_find_free of <noc.vc.apps.vc.views.VCApplication object at 0x80918d050>>}
  98. Form = <class 'django.forms.forms.Form'>
  99. g = {u'vc_domain': u'16', u'vc_filter': u'14'}
  100. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  101. request = <WSGIRequest
  102. GET:<QueryDict: {u'vc_domain': [u'16'], u'_dc': [u'1344320454528'], u'vc_filter': [u'14']}>,
  103. POST:<QueryDict: {}>,
  104. COOKIES:{'csrftoken': '15fc69f1ce3ad129e1695ed1affac5e2',
  105. 'sessionid': 'ea43713788bea92af05c2f2957188983'},
  106. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  107. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  108. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  109. 'HTTP_CONNECTION': 'close',
  110. 'HTTP_COOKIE': 'csrftoken=15fc69f1ce3ad129e1695ed1affac5e2; sessionid=ea43713788bea92af05c2f2957188983',
  111. 'HTTP_DNT': '1',
  112. 'HTTP_HOST': '127.0.0.1:8000',
  113. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1',
  114. 'PATH_INFO': u'/vc/vc/find_free/',
  115. 'QUERY_STRING': '_dc=1344320454528&vc_domain=16&vc_filter=14',
  116. 'REMOTE_ADDR': '127.0.0.1',
  117. 'REQUEST_METHOD': 'GET',
  118. 'SCRIPT_NAME': u'',
  119. 'SERVER_NAME': '127.0.0.1',
  120. 'SERVER_PORT': '8000',
  121. 'SERVER_PROTOCOL': 'HTTP/1.0',
  122. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8040ef5d0>,
  123. 'wsgi.input': <_io.BytesIO object at 0x809d14290>,
  124. 'wsgi.multiprocess': True,
  125. 'wsgi.multithread': False,
  126. 'wsgi.run_once': False,
  127. 'wsgi.url_scheme': 'http',
  128. 'wsgi.version': (1, 0)}>
  129. self = <noc.lib.app.site.Site object at 0x8063936d0>
  130. args = ()
  131. v = <bound method VCApplication.api_find_free of <noc.vc.apps.vc.views.VCApplication object at 0x80918d050>>
  132. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  133. to_log_api_call = False
  134. kwargs = {'vc_domain': <VCDomain: NN>, 'vc_filter': <VCFilter: To-sovintel>}
  135. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  136. app = <noc.vc.apps.vc.views.VCApplication object at 0x80918d050>
  137. ------------------------------------------------------------------------
  138. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment