taurus-org / taurus

Moved to https://gitlab.com/taurus-org/taurus
http://taurus-scada.org
43 stars 46 forks source link

Taurus form can not display Tango DevEncoded attributes #1013

Closed cmft closed 4 years ago

cmft commented 4 years ago

Taurus form reports a lot of warning when you set a DevEncoded attribute You can reproduce with:

taurus form MacroServer/cfalcon/1/Environment
/usr/lib/python3/dist-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
MainThread     WARNING  2019-09-30 15:57:56,336 TaurusRootLogger: Cannot add "guiqwt" subcommand to taurus. Reason: ImportError("No module named 'guiqwt'",)
MainThread     WARNING  2019-09-30 15:57:56,352 TaurusRootLogger: <frozen importlib._bootstrap>:222: DeprecationWarning: taurus.external.qt.Qwt5 is deprecated since 4.5

MainThread     WARNING  2019-09-30 15:57:56,515 DefaultReadWidgetLabel.tango://pc253.cells.es:10000/MacroServer/cfalcon/1/Environment: Error formatting display (ValueError("Single '}' encountered in format string",)). Reverting to raw string
MainThread     WARNING  2019-09-30 15:57:56,520 UnitLessLineEdit.tango://pc253.cells.es:10000/MacroServer/cfalcon/1/Environment#wvalue.magnitude: Cannot return value for "('Not initialised', b'')". Reason: TypeError('Unsupported model type "6"',)
cpascual commented 4 years ago

I think that we never intended to support Tango DevEncoded Attributes in a generic widget such as TaurusForm, since DevEncoded is essentially an opaque type that needs some context info to be decoded (which is something that we lack in the generic case).

Also, note that DevEncoded is a Tango-centric type, and therefore if we are to support them to some extent, the support should be implemented in the tango scheme (probably in TangoAttribute.decode())

Considering these comments, do you have any suggestion on how we could improve the current support of DevEncoded attributes?

Otherwise, I propose to close this as "wontfix"

cmft commented 4 years ago

Agree.

Maybe it could be implemented in the tango formatter (in jive it is possible to read them). I don't have any require on it, I just wanted to rise this question with the community