Closed andygotz closed 7 years ago
The problem here is that the device is not compatible with python 3, because the metaclass is not set properly. Simply replace your class definition with one of the following:
syntax for python 2:
class PowerSupply(Device):
__metaclass__ = DeviceMeta
[...]
syntax for python 3:
class PowerSupply(Device, metaclass=DeviceMeta):
[...]
syntax for both, using six:
@six.add_metaclass(DeviceMeta)
class PowerSupply(Device):
[...]
I agree this issue is confusing, and we should do something in pytango to raise a meaningful exception and document it properly. We might also want to update the pogo templates.
Cool it works! Thanks for the explanation.
Related: metaclass definition won't be necessary anymore after PR #90 is merged.
Great!
I have installed the latest version of PyTango (from PyPi) 9.2.0 (well done on doing a great job - the installation worked like a charm!). But then when I tried to run a device server which uses the HLAPI. I tried one generated with the latest version of pogo and the PowerSupplyDS in the Getting Started. Both of them fail with this error:
I can run PyTango device servers which use the low level api. It would be nice if I could use the high level api. The servers are much more compact and easier to write!
Thanks for your help in advance
Andy