weird init_device() error while trying to launch a python device

Hi all,
I get the following error when trying to start one of my python devices. It used to work smoothly till I switched to PyTango 9.2.2 + Tango 9.2.5a. The first error "desc" field is really weird. Any idea?
Thanks.

Exiting: Server exited with tango.DevFailed:
DevFailed[
DevError[
    desc = TypeError: unbound method init_device() must be called with FtpClient instance as first argument (got FtpClient instance instead)
           
  origin =   File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/device_class.py", line 568, in __DeviceClass__device_factory
    device = self._new_device(deviceImplClass, klass, dev_name)
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/device_class.py", line 547, in __DeviceClass__new_device
    return klass(dev_class, dev_name)
  File "/home/informatique/ica/leclercq/FlyscanRoot/lib/python2.7/site-packages/fs/ftpclient/ds_FtpClient.py", line 54, in __init__
    Device.__init__(self, cl, name)
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/server.py", line 571, in __init__
    self.init_device()
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/server.py", line 360, in init_device
    return get_worker().execute(init_device_orig, self)
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/green.py", line 86, in execute
    return fn(*args, **kwargs)
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/server.py", line 360, in init_device
    return get_worker().execute(init_device_orig, self)
  File "/home/informatique/ica/leclercq/FlyscanRoot/python2/lib/python2.7/site-packages/pytango-9.2.2-py2.7-linux-i686.egg/tango/green.py", line 86, in execute
    return fn(*args, **kwargs)

  reason = PyDs_PythonError
severity = ERR]
]
Hi Nicolas,

Could you attach the code for this FtpClient device class?

Thanks in advance.
Hi Tiago,
Here is the original version - i.e the one working with pytango-9.2.2 + tango 9.2.2.
Thanks for your help.
Hi Nicolas,

The following decorator is no longer necessary since pytango 9.2.1:

@add_metaclass(DeviceMeta)

This should fix the problem, although I'm not happy with this backward compatibility break.

I'll run a quick investigation. Thanks for the report.
Works! Thanks guys.
 
Register or login to create to post a reply.