AttributeError: '_BoundMethodWeakrefWithCall' object has no attribute '__name__
Hi,
I copy it from https://github.com/sardana-org/sardana/issues/709 because it looks like something is wrong between Taurus 4.3 and PyTango 9.2.3. I tried to run MAcroserver with sardana 2.3.3 on stretch on to different boxes and I get the same error:
MainThread DEBUG 2018-02-22 17:04:42,209 MS_stretch-jk_1.MacroManager: Adding macro class sequence
MainThread DEBUG 2018-02-22 17:04:42,217 MS_stretch-jk_1: Creating pool Pool/stretch-jk/1
MainThread DEBUG 2018-02-22 17:04:42,233 TangoFactory: Error creating attribute tango://stretch-jk:10000/Pool/stretch-jk/1/Elements
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangofactory.py", line 404, in getAttribute
attr = attr_klass(full_attr_name, dev, **kwargs)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 298, in __init__
self._subscribeConfEvents()
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 727, in _subscribeConfEvents
_BoundMethodWeakrefWithCall(self.push_event), [], True)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 182, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 96, in run
return fn(*args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1153, in __DeviceProxy__subscribe_event
return __DeviceProxy__subscribe_event_attrib(self, *args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1203, in __DeviceProxy__subscribe_event_attrib
cb_or_queuesize, obj=self, green_mode=green_mode)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 195, in green_callback
@wraps(fn)
File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: '_BoundMethodWeakrefWithCall' object has no attribute '__name__'
MainThread DEBUG 2018-02-22 17:04:42,236 TangoFactory: Error creating device Pool/stretch-jk/1
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangofactory.py", line 346, in getDevice
d = dev_klass(full_dev_name, **kw)
File "/usr/lib/python2.7/dist-packages/sardana/taurus/core/tango/sardana/pool.py", line 1653, in __init__
self.getAttribute("Elements").addListener(self.on_elements_changed)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangodevice.py", line 110, in getAttribute
return self.factory().getAttribute(attrname)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangofactory.py", line 404, in getAttribute
attr = attr_klass(full_attr_name, dev, **kwargs)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 298, in __init__
self._subscribeConfEvents()
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 727, in _subscribeConfEvents
_BoundMethodWeakrefWithCall(self.push_event), [], True)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 182, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 96, in run
return fn(*args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1153, in __DeviceProxy__subscribe_event
return __DeviceProxy__subscribe_event_attrib(self, *args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1203, in __DeviceProxy__subscribe_event_attrib
cb_or_queuesize, obj=self, green_mode=green_mode)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 195, in green_callback
@wraps(fn)
File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
AttributeError: '_BoundMethodWeakrefWithCall' object has no attribute '__name__'
MainThread INFO 2018-02-22 17:04:42,240 TaurusRootLogger: Exiting
MainThread CRITICAL 2018-02-22 17:04:42,240 TaurusRootLogger: Server exited with DevFailed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sardana/tango/core/util.py", line 889, in run_tango_server
util.server_init()
DevFailed: DevFailed[
DevError[
desc = AttributeError: '_BoundMethodWeakrefWithCall' object has no attribute '__name__'
origin = File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_class.py", line 568, in __DeviceClass__device_factory
device = self._new_device(deviceImplClass, klass, dev_name)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_class.py", line 547, in __DeviceClass__new_device
return klass(dev_class, dev_name)
File "/usr/lib/python2.7/dist-packages/sardana/tango/macroserver/MacroServer.py", line 50, in __init__
SardanaDevice.__init__(self,cl, name)
File "/usr/lib/python2.7/dist-packages/sardana/tango/core/SardanaDevice.py", line 91, in __init__
self.init_device()
File "/usr/lib/python2.7/dist-packages/sardana/tango/macroserver/MacroServer.py", line 116, in init_device
macro_server.set_pool_names(self.PoolNames)
File "/usr/lib/python2.7/dist-packages/sardana/macroserver/macroserver.py", line 302, in set_pool_names
pool = Device(name)
File "/usr/lib/python2.7/dist-packages/taurus/core/taurushelper.py", line 262, in Device
return Factory(scheme=getSchemeFromName(device_name)).getDevice(device_name)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangofactory.py", line 346, in getDevice
d = dev_klass(full_dev_name, **kw)
File "/usr/lib/python2.7/dist-packages/sardana/taurus/core/tango/sardana/pool.py", line 1653, in __init__
self.getAttribute("Elements").addListener(self.on_elements_changed)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangodevice.py", line 110, in getAttribute
return self.factory().getAttribute(attrname)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangofactory.py", line 404, in getAttribute
attr = attr_klass(full_attr_name, dev, **kwargs)
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 298, in __init__
self._subscribeConfEvents()
File "/usr/lib/python2.7/dist-packages/taurus/core/tango/tangoattribute.py", line 727, in _subscribeConfEvents
_BoundMethodWeakrefWithCall(self.push_event), [], True)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 182, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 96, in run
return fn(*args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1153, in __DeviceProxy__subscribe_event
return __DeviceProxy__subscribe_event_attrib(self, *args, **kwargs)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/device_proxy.py", line 1203, in __DeviceProxy__subscribe_event_attrib
cb_or_queuesize, obj=self, green_mode=green_mode)
File "/home/jkotan/testinst/lib/python2.7/site-packages/pytango-9.2.3.dev0-py2.7-linux-x86_64.egg/tango/green.py", line 195, in green_callback
@wraps(fn)
File "/usr/lib/python2.7/functools.py", line 33, in update_wrapper
setattr(wrapper, attr, getattr(wrapped, attr))
reason = PyDs_PythonError
severity = ERR]
]
MainThread INFO 2018-02-22 17:04:42,243 TaurusRootLogger: Exited
terminate called after throwing an instance of 'omni_thread_fatal'
Aborted'
It looks like _BoundMethodWeakrefWithCall
is not a function but a class so it does not have a __name__
attribute and the function decorator @wraps
in PyTango thows exception.
Bests, Jan