Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 013-02-05 13:45:30,040 UNHANDLED EXCEPTION (2013-02-05 13:45:30.035542)
- Working directory: /opt/noc
- <type 'exceptions.UnicodeEncodeError'>
- 'ascii' codec can't encode characters in position 25-32: ordinal not in range(128)
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /usr/lib/python2.7/threading.py (Line: 442)
- Function: __init__
- 435 def __init__(self, group=None, target=None, name=None,
- 436 args=(), kwargs=None, verbose=None):
- 437 assert group is None, "group argument must be None for now"
- 438 _Verbose.__init__(self, verbose)
- 439 if kwargs is None:
- 440 kwargs = {}
- 441 self.__target = target
- 442 ==> self.__name = str(name or _newname())
- 443 self.__args = args
- 444 self.__kwargs = kwargs
- 445 self.__daemonic = self._set_daemon()
- 446 self.__ident = None
- 447 self.__started = Event()
- 448 self.__stopped = False
- Variables:
- group = None
- target = None
- self = repr() failed
- args = ()
- name =
- u'Generic.get_discovery_id(\u0424\u043b\u043e\u0442\u0441\u043a\u0430\u044f 1 \u043e\u0444\u0438\u0441, 10.3.0.13)'
- kwargs = {}
- verbose = None
- ------------------------------------------------------------------------
- File: /opt/noc/sa/script/script.py (Line: 204)
- Function: __init__
- 197 # Test encoding
- 198 try:
- 199 u"test".encode(v)
- 200 self.encoding = v
- 201 self.debug("Using '%s' encoding" % v)
- 202 except LookupError:
- 203 self.error("Unknown encoding: '%s'" % v)
- 204 ==> super(Script, self).__init__(name=self.debug_name, kwargs=kwargs)
- 205 self.activator = _activator
- 206 self.servers = _activator.servers
- 207 self.profile = profile
- 208 self.cli_provider = None
- 209 self.http = HTTPProvider(self)
- 210 self.snmp = SNMPProvider(self)
- Variables:
- a = <noc.sa.protocols.sae_pb2.KWArg object at 0x2c80530>
- profile = <noc.sa.profiles.Huawei.VRP.Profile object at 0x2c66fd0>
- timeout = 120
- parent = None
- self = repr() failed
- p = u'10.3.0.13'
- object_name =
- u'\u0424\u043b\u043e\u0442\u0441\u043a\u0430\u044f 1 \u043e\u0444\u0438\u0441'
- access_profile = <noc.sa.protocols.sae_pb2.AccessProfile object at 0x2c80a10>
- kwargs = {}
- _activator = <noc.sa.activator.activator.Activator object at 0x216bfd0>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/activator/activator.py (Line: 403)
- Function: run_script
- 396 Begin script execution
- 397 """
- 398 pv, pos, sn = script_name.split(".", 2)
- 399 profile = profile_registry["%s.%s" % (pv, pos)]()
- 400 script_class = script_registry[script_name]
- 401 if not timeout:
- 402 timeout = script_class.TIMEOUT
- 403 ==> script = script_class(profile, self, object_name, access_profile, timeout, **kwargs)
- 404 logging.info("Script %s(%s). Timeout set to %s" % (script_name,
- 405 access_profile.address, timeout))
- 406 with self.script_lock:
- 407 self.script_threads[script] = callback
- 408 logging.info("%d script threads (%d max)" % (
- 409 len(self.script_threads), self.max_script_threads))
- Variables:
- profile = <noc.sa.profiles.Huawei.VRP.Profile object at 0x2c66fd0>
- pv = u'Huawei'
- access_profile = <noc.sa.protocols.sae_pb2.AccessProfile object at 0x2c80a10>
- script_class = <class 'noc.sa.profiles.Generic.get_discovery_id.Script'>
- self = <noc.sa.activator.activator.Activator object at 0x216bfd0>
- pos = u'VRP'
- script_name = u'Huawei.VRP.get_discovery_id'
- callback = <function script_callback at 0x2623500>
- object_name =
- u'\u0424\u043b\u043e\u0442\u0441\u043a\u0430\u044f 1 \u043e\u0444\u0438\u0441'
- sn = u'get_discovery_id'
- timeout = 120
- kwargs = {}
- ------------------------------------------------------------------------
- File: /opt/noc/sa/activator/service.py (Line: 91)
- Function: script
- 84 return
- 85 # Deserialize additional arguments
- 86 kwargs = {}
- 87 for a in request.kwargs:
- 88 kwargs[str(a.key)] = cPickle.loads(str(a.value))
- 89 self.activator.run_script(request.object_name, request.script,
- 90 request.access_profile, script_callback, request.timeout,
- 91 ==> **kwargs)
- 92
- 93 def ping_check(self, controller, request, done):
- 94 """
- 95 Start ping check of addresses
- 96 """
- 97 def ping_check_callback(unreachable):
- Variables:
- profile = <class 'noc.sa.profiles.Huawei.VRP.Profile'>
- script_class = <class 'noc.sa.profiles.Generic.get_discovery_id.Script'>
- script_callback = <function script_callback at 0x2623500>
- request = <noc.sa.protocols.sae_pb2.ScriptRequest object at 0x2c809a8>
- controller = <noc.sa.rpc.Controller object at 0x2c7fb90>
- done =
- <bound method ActivatorSocket.send_response of <ActivatorSocket(0x2635150, 127.0.0.1:19701, connected)>>
- kwargs = {}
- self = <noc.sa.activator.service.Service object at 0x1f582d0>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/protobuf-2.4.1-py2.7.egg/google/protobuf/service_reflection.py (Line: 171)
- Function: _CallMethod
- 164 request: Request protocol message.
- 165 callback: A callback to invoke after the method has completed.
- 166 """
- 167 if method_descriptor.containing_service != self.descriptor:
- 168 raise RuntimeError(
- 169 'CallMethod() given method descriptor for wrong service type.')
- 170 method = getattr(srvc, method_descriptor.name)
- 171 ==> return method(rpc_controller, request, callback)
- 172
- 173 def _GetRequestClass(self, method_descriptor):
- 174 """Returns the class of the request protocol message.
- 175
- 176 Args:
- 177 method_descriptor: Descriptor of the method for which to return the
- Variables:
- srvc = <noc.sa.activator.service.Service object at 0x1f582d0>
- method_descriptor = <google.protobuf.descriptor.MethodDescriptor object at 0x1ece9d0>
- self = <google.protobuf.service_reflection._ServiceBuilder object at 0x1ecec10>
- request = <noc.sa.protocols.sae_pb2.ScriptRequest object at 0x2c809a8>
- rpc_controller = <noc.sa.rpc.Controller object at 0x2c7fb90>
- callback =
- <bound method ActivatorSocket.send_response of <ActivatorSocket(0x2635150, 127.0.0.1:19701, connected)>>
- method =
- <bound method Service.script of <noc.sa.activator.service.Service object at 0x1f582d0>>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/protobuf-2.4.1-py2.7.egg/google/protobuf/service_reflection.py (Line: 146)
- Function: _WrapCallMethod
- 139
- 140 # CallMethod needs to operate with an instance of the Service class. This
- 141 # internal wrapper function exists only to be able to pass the service
- 142 # instance to the method that does the real CallMethod work.
- 143 def _WrapCallMethod(srvc, method_descriptor,
- 144 rpc_controller, request, callback):
- 145 return self._CallMethod(srvc, method_descriptor,
- 146 ==> rpc_controller, request, callback)
- 147 self.cls = cls
- 148 cls.CallMethod = _WrapCallMethod
- 149 cls.GetDescriptor = staticmethod(lambda: self.descriptor)
- 150 cls.GetDescriptor.__doc__ = "Returns the service descriptor."
- 151 cls.GetRequestClass = self._GetRequestClass
- 152 cls.GetResponseClass = self._GetResponseClass
- Variables:
- rpc_controller = <noc.sa.rpc.Controller object at 0x2c7fb90>
- method_descriptor = <google.protobuf.descriptor.MethodDescriptor object at 0x1ece9d0>
- self = <google.protobuf.service_reflection._ServiceBuilder object at 0x1ecec10>
- request = <noc.sa.protocols.sae_pb2.ScriptRequest object at 0x2c809a8>
- srvc = <noc.sa.activator.service.Service object at 0x1f582d0>
- callback =
- <bound method ActivatorSocket.send_response of <ActivatorSocket(0x2635150, 127.0.0.1:19701, connected)>>
- ------------------------------------------------------------------------
- File: /opt/noc/sa/rpc.py (Line: 416)
- Function: rpc_handle_request
- 409 req.ParseFromString(request.serialized_request)
- 410 # logging.debug("Request accepted:\nid: %s\n%s" % (id, str(req)))
- 411 controller = Controller(self)
- 412 controller.transaction = self.transactions.begin(id=id,
- 413 method=request.method)
- 414 try:
- 415 self.service.CallMethod(method, controller,
- 416 ==> req, self.send_response)
- 417 except:
- 418 self.send_error(id, ERR_INTERNAL,
- 419 "RPC Call to %s failed" % request.method)
- 420 error_report()
- 421 else:
- 422 self.send_error(id, ERR_INVALID_METHOD,
- Variables:
- self = <ActivatorSocket(0x2635150, 127.0.0.1:19701, connected)>
- req = <noc.sa.protocols.sae_pb2.ScriptRequest object at 0x2c809a8>
- request = <noc.sa.protocols.sae_pb2.Request object at 0x2c807a0>
- id = 1762446858
- controller = <noc.sa.rpc.Controller object at 0x2c7fb90>
- method = <google.protobuf.descriptor.MethodDescriptor object at 0x1ece9d0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement