Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2018-03-15 10:00:26.301329)
- PROCESS: ./services/web/service.py
- VERSION: 15.05.1+microservices.9141.4c85fb66
- BRANCH: microservices CHANGESET: 4c85fb66
- ERROR FINGERPRINT: 6743fbae-042a-59d2-b1f6-fe3c995ef940
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <class 'django.core.urlresolvers.NoReverseMatch'> Reverse for 'import' with arguments '(u'sa.ManagedObject',)' and keyword arguments '{}' not found.
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: local/lib/python2.7/site-packages/django/core/urlresolvers.py (Line: 422)
- Function: _reverse_with_prefix
- 415 m = getattr(lookup_view, '__module__', None)
- 416 n = getattr(lookup_view, '__name__', None)
- 417 if m is not None and n is not None:
- 418 lookup_view_s = "%s.%s" % (m, n)
- 419 else:
- 420 lookup_view_s = lookup_view
- 421 raise NoReverseMatch("Reverse for '%s' with arguments '%s' and keyword "
- 422 ==> "arguments '%s' not found." % (lookup_view_s, args, kwargs))
- 423
- 424 class LocaleRegexURLResolver(RegexURLResolver):
- 425 """
- 426 A URL resolver that always matches the active language code as URL prefix.
- 427
- 428 Rather than taking a regex argument, we just override the ``regex``
- Variables:
- candidate = u'/main/csv/import/sa.ManagedObject/'
- val = u'sa.ManagedObject'
- _prefix = u'/'
- pattern = 'main/csv/import/(?P<model>[a-z1-9]+\\.[a-z1-9]+)/$'
- self =
- <RegexURLResolver [<RegexURLResolver [<RegexURLPattern None ^launch_info/$>, <RegexURLPattern import ^import/(?P<model>[a-z1-9]+\.[a-z1-9]+)/$>, <RegexURLPattern index ^$>] (None:None) main/csv/>] (None:None) ^/>
- args = (u'sa.ManagedObject',)
- m = None
- lookup_view_s = 'import'
- possibility = [(u'main/csv/import/%(model)s/', ['model'])]
- unicode_args = [u'sa.ManagedObject']
- possibilities =
- [([(u'main/csv/import/%(model)s/', ['model'])],
- 'main/csv/import/(?P<model>[a-z1-9]+\\.[a-z1-9]+)/$',
- {})]
- lookup_view = 'import'
- prefix_norm = u'/'
- prefix_args = []
- params = ['model']
- result = u'main/csv/import/%(model)s/'
- defaults = {}
- kwargs = {}
- n = None
- ------------------------------------------------------------------------
- File: local/lib/python2.7/site-packages/django/core/urlresolvers.py (Line: 502)
- Function: reverse
- 495 (key, ':'.join(resolved_path)))
- 496 else:
- 497 raise NoReverseMatch("%s is not a registered namespace" %
- 498 key)
- 499 if ns_pattern:
- 500 resolver = get_ns_resolver(ns_pattern, resolver)
- 501
- 502 ==> return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
- 503
- 504 reverse_lazy = lazy(reverse, str)
- 505
- 506 def clear_url_caches():
- 507 global _resolver_cache
- 508 global _ns_resolver_cache
- Variables:
- ns_pattern = 'main/csv/'
- args = (u'sa.ManagedObject',)
- viewname = 'main:csv:import'
- extra = 'csv/'
- view = 'import'
- current_app = None
- prefix = u'/'
- parts = ['import', 'csv', 'main']
- resolver =
- <RegexURLResolver [<RegexURLResolver [<RegexURLPattern None ^launch_info/$>, <RegexURLPattern import ^import/(?P<model>[a-z1-9]+\.[a-z1-9]+)/$>, <RegexURLPattern index ^$>] (None:None) main/csv/>] (None:None) ^/>
- kwargs = {}
- path = []
- ns = 'csv'
- urlconf = 'noc.urls'
- resolved_path = ['main', 'csv']
- ------------------------------------------------------------------------
- File: lib/app/site.py (Line: 479)
- Function: reverse
- 472 """
- 473 if self.rx_namespace.match(url):
- 474 kw = kwargs.copy()
- 475 query = ""
- 476 if "QUERY" in kw:
- 477 query = "?" + urllib.urlencode(kw["QUERY"])
- 478 del kw["QUERY"]
- 479 ==> return reverse(url, args=args, kwargs=kw) + query
- 480 else:
- 481 return url
- 482
- 483 def sort_menu(self):
- 484 """
- 485 Sort application menu
- Variables:
- url = 'main:csv:import'
- self = <noc.lib.app.site.Site object at 0x7f3a494d91d0>
- args = (u'sa.ManagedObject',)
- kw = {}
- kwargs = {}
- query = ''
- ------------------------------------------------------------------------
- File: lib/app/application.py (Line: 223)
- Function: reverse
- 216 """
- 217 return "/%s/%s/" % (self.module, self.app)
- 218
- 219 def reverse(self, url, *args, **kwargs):
- 220 """
- 221 Reverse URL name to URL
- 222 """
- 223 ==> return self.site.reverse(url, *args, **kwargs)
- 224
- 225 def message_user(self, request, message):
- 226 """
- 227 Send a message to user
- 228 """
- 229 if "noc_user" in request.COOKIES:
- Variables:
- url = 'main:csv:import'
- self =
- <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>
- args = (u'sa.ManagedObject',)
- kwargs = {}
- ------------------------------------------------------------------------
- File: lib/app/application.py (Line: 341)
- Function: response_redirect
- 334 return serve_static(request, path, document_root=document_root)
- 335
- 336 def response_redirect(self, url, *args, **kwargs):
- 337 """
- 338 Redirect to URL
- 339 """
- 340 if ":" in url:
- 341 ==> url = self.reverse(url, *args, **kwargs)
- 342 return HttpResponseRedirect(url)
- 343
- 344 def response_redirect_to_referrer(self, request, back_url=None):
- 345 """
- 346 Redirect to referrer page
- 347 """
- Variables:
- url = 'main:csv:import'
- self =
- <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>
- args = (u'sa.ManagedObject',)
- kwargs = {}
- ------------------------------------------------------------------------
- File: services/web/apps/main/csv/views.py (Line: 54)
- Function: view_index
- 47 return self.render_plain_text(
- 48 csv_export(model),
- 49 mimetype="text/csv; encoding=utf-8"
- 50 )
- 51 else:
- 52 return self.response_redirect(
- 53 "main:csv:import",
- 54 ==> form.cleaned_data["model"]
- 55 )
- 56 else:
- 57 form = ModelForm()
- 58 return self.render(request, "index.html", form=form)
- 59
- 60 class ImportForm(forms.Form):
- Variables:
- request =
- <WSGIRequest
- path:/main/csv/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'', u'Import'], u'model': [u'sa.ManagedObject']}>,
- COOKIES:{'noc_user': '2|1:0|10:1520917023|8:noc_user|8:YWRtaW4=|ac985a8d416a0f029afe096904571733e0fd0adc4d03abbd326ae0889a993982'},
- META:{'CONTENT_LENGTH': '44',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, br',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'noc_user="2|1:0|10:1520917023|8:noc_user|8:YWRtaW4=|ac985a8d416a0f029afe096904571733e0fd0adc4d03abbd326ae0889a993982"',
- 'HTTP_HOST': '10.220.21.122',
- 'HTTP_ORIGIN': 'https://10.220.21.122',
- 'HTTP_REFERER': 'https://10.220.21.122/main/csv/',
- 'HTTP_REMOTE_USER': 'admin',
- 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
- 'HTTP_X_FORWARDED_FOR': '10.20.13.40',
- 'HTTP_X_FORWARDED_PROTO': 'https',
- 'HTTP_X_IMFORWARDS': '20',
- 'HTTP_X_REAL_IP': '10.20.13.40',
- 'HTTP_X_SCHEME': 'https',
- 'PATH_INFO': u'/main/csv/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.20.13.40',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '10.220.21.122',
- 'SERVER_PORT': '443',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f3a599f51e0>,
- 'wsgi.input': <_io.BytesIO object at 0x7f3a388ee050>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'https',
- 'wsgi.version': (1, 0)}>
- self =
- <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>
- ModelForm = <class 'noc.services.web.apps.main.csv.views.ModelForm'>
- form =
- <noc.services.web.apps.main.csv.views.ModelForm object at 0x7f3a3890ccd0>
- ------------------------------------------------------------------------
- File: lib/app/site.py (Line: 230)
- Function: inner
- 223 for k, v in request.POST.lists())
- 224 elif request.method == "GET":
- 225 a = dict((k, v[0] if len(v) == 1 else v)
- 226 for k, v in request.GET.lists())
- 227 app_logger.debug("API %s %s %s",
- 228 request.method, request.path, a)
- 229 # Call handler
- 230 ==> r = v(request, *args, **kwargs)
- 231 # Dump SQL statements
- 232 if self.log_sql_statements:
- 233 from django.db import connections
- 234 tsc = 0
- 235 sc = defaultdict(int)
- 236 for conn in connections.all():
- Variables:
- args = ()
- view_map =
- {'DELETE': <bound method CSVApplication.view_index of <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>>,
- 'GET': <bound method CSVApplication.view_index of <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>>,
- 'POST': <bound method CSVApplication.view_index of <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>>,
- 'PUT': <bound method CSVApplication.view_index of <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>>}
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x7f3a494d91d0>
- v =
- <bound method CSVApplication.view_index of <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>>
- request =
- <WSGIRequest
- path:/main/csv/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'', u'Import'], u'model': [u'sa.ManagedObject']}>,
- COOKIES:{'noc_user': '2|1:0|10:1520917023|8:noc_user|8:YWRtaW4=|ac985a8d416a0f029afe096904571733e0fd0adc4d03abbd326ae0889a993982'},
- META:{'CONTENT_LENGTH': '44',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, br',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
- 'HTTP_CACHE_CONTROL': 'max-age=0',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'noc_user="2|1:0|10:1520917023|8:noc_user|8:YWRtaW4=|ac985a8d416a0f029afe096904571733e0fd0adc4d03abbd326ae0889a993982"',
- 'HTTP_HOST': '10.220.21.122',
- 'HTTP_ORIGIN': 'https://10.220.21.122',
- 'HTTP_REFERER': 'https://10.220.21.122/main/csv/',
- 'HTTP_REMOTE_USER': 'admin',
- 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
- 'HTTP_X_FORWARDED_FOR': '10.20.13.40',
- 'HTTP_X_FORWARDED_PROTO': 'https',
- 'HTTP_X_IMFORWARDS': '20',
- 'HTTP_X_REAL_IP': '10.20.13.40',
- 'HTTP_X_SCHEME': 'https',
- 'PATH_INFO': u'/main/csv/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '10.20.13.40',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '10.220.21.122',
- 'SERVER_PORT': '443',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f3a599f51e0>,
- 'wsgi.input': <_io.BytesIO object at 0x7f3a388ee050>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'https',
- 'wsgi.version': (1, 0)}>
- app_logger = <logging.Logger object at 0x7f3a39064650>
- InterfaceTypeError = <type 'exceptions.ValueError'>
- to_log_api_call = False
- kwargs = {}
- nq = <function nq at 0x7f3a388f59b0>
- app =
- <noc.services.web.apps.main.csv.views.CSVApplication object at 0x7f3a390642d0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement