Menu

#133 TaurusValue: TypeError: argument 1 of Alignment() has an invalid type

Jan15
resolved
None
bug
2015-03-30
2014-12-18
Sergi Rubio
No

A patch to avoid the exceptions (not a fix) is attached.

The Exception can be reproduced launching

python taurus/qt/qtgui/panel/taurusdevicepanel.py sys/database/2 ".*"

Then Taurus fails to display the TarusValue for attributes with the following exception:

File "~/LIBS/python/taurus/qt/qtgui/panel/taurusvalue.py", line 792, in addLabelWidgetToLayout
Qt.Qt.Alignment(0))
TypeError: argument 1 of Alignment() has an invalid type

If 0 is replaced by AlignLeft then a new exception occurs:

File "~/LIBS/python/taurus/qt/qtgui/panel/taurusvalue.py", line 794, in addLabelWidgetToLayout
alignment=alignment)
TypeError: addWidget() takes no keyword arguments

To bypass the error I just commented the alignment-related lines.

1 Attachments

Discussion

  • Carlos Pascual

    Carlos Pascual - 2015-01-09

    Note: this is a PyQt4.4-related issue. It works well with newer PyQts

     
  • Carlos Falcon

    Carlos Falcon - 2015-01-13

    Hello Sergi,
    We found the problem and a possible solution. A new patch has been sent to the list.

    Thanks.

     
  • Carlos Falcon

    Carlos Falcon - 2015-01-13
    • assigned_to: Carlos Falcon
     
  • Carlos Pascual

    Carlos Pascual - 2015-01-14
    • status: waiting --> resolved
     
  • Carlos Pascual

    Carlos Pascual - 2015-01-14

    Applied patch (to develop) from cfalcon that fixes the issue (not just bypasses it).

     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/300/

    Can't be converted:

    • _category: taurus-qt