Subclasses in PyTango / Pogo

Hi all,

I have a device class written (and works well). I now want to create another device that is a subclass of this device. Since I am using POGO, I used the POGO tool to create this sub-device, which inherits all the commands of the parent class. Commands are shown correctly in amber colour.

Initially, due to an older version of POGO, I had a problem with missing brackets for class property lists etc. as shown here. This is solved. I created an instance of both devices, and they both show in Jive. The parent device server can be started normally. However, when I attempt to start the second device server, I get the following error:

python TPM_DS.py test -v1
Traceback (most recent call last):
  File "TPM_DS.py", line 61, in <module>
    class TPM_DS (FPGA_DS):
TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)

I have added no new commands etc to this device, I merely subclassed the parent and kept the code as is. Any thoughts?

Thanks a lot!
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher
Department of Physics
Institute of Space Sciences and Astronomy

Room 220, Maths and Physics Building
University of Malta, Msida MSD2080, MALTA
Hi just wanted to mark this as solved - I followed the guide here to upgrade POGO.

Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher
Department of Physics
Institute of Space Sciences and Astronomy

Room 220, Maths and Physics Building
University of Malta, Msida MSD2080, MALTA
Another POGO related question: by default subclasses inherit all the functions/properties etc. But pogo is generating empty overriding methods…I can of course just call the super class for each, but was wondering if there's a way to just select which methods I want to over-ride (via POGO), for cleaner code. It seems I can "delete" over-ride commands, so that's one possible way. Any other methods?

Thanks.
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher
Department of Physics
Institute of Space Sciences and Astronomy

Room 220, Maths and Physics Building
University of Malta, Msida MSD2080, MALTA
 
Register or login to create to post a reply.