Menu

#641 python3 error handling issue

closed-fixed
None
PyTango
5
2014-08-28
2013-11-29
No

Hello here an error message when I am using pytango 8.1.1 (debian unstable)

picca@mordor:~/Projets/vispy$ itango3
ITango 8.1.1 -- An interactive Tango client.

Running on top of Python 3.3.3, IPython 0.13.2 and PyTango 8.1.1

help -> ITango's help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

IPython profile: tango

hint: Try typing: mydev = Device("<tab></tab>

ITango [1]: dev = Device("mu01")

ITango [2]: dev.ping()
Custom TB Handler failed, unregistering


TypeError Traceback (most recent call last)
/usr/lib/python3/dist-packages/PyTango/ipython/ipython_00_11/ipython_00_11.py in __exc_handler(ip, etype, value, tb, tb_offset)
537 user_ns[_TANGO_ERR] = etype, value, tb, tb_offset
538 if len(value.args):
--> 539 v = value[0]
540 print("%s: %s" % (v.reason ,v.desc))
541 else:

TypeError: 'ConnectionFailed' object does not support indexing
The original exception:

ITango [3]:

with python2

picca@mordor:~$ itango
ITango 8.1.1 -- An interactive Tango client.

Running on top of Python 2.7.6, IPython 0.13.2 and PyTango 8.1.1

help -> ITango's help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

IPython profile: tango

hint: Try typing: mydev = Device("<tab></tab>

ITango [1]: dev = Device("mu01")

ITango [2]: dev.ping()
API_DeviceNotExported: Device mu01 is not exported (hint: try starting the device server)
(For more detailed information type: tango_error)

if I retry with python3 I get this

ITango [3]: dev.ping()

ConnectionFailed Traceback (most recent call last)
<ipython-input-3-ec320228ae5c> in <module>()
----> 1 dev.ping()</module></ipython-input-3-ec320228ae5c>

/usr/lib/python3/dist-packages/PyTango/green.py in greener(self, args, kwargs)
163
164 # submit the method
--> 165 ret = submit(fn, self,
args, **kwargs)
166
167 # return the proper result

/usr/lib/python3/dist-packages/PyTango/green.py in synch_submit(fn, args, kwargs)
79
80 def synch_submit(fn,
args, kwargs):
---> 81 return get_synch_executor().submit(fn, *args,
kwargs)
82
83 __executor_map = {

/usr/lib/python3/dist-packages/PyTango/green.py in submit(self, fn, args, kwargs)
71 class SynchExecutor(object):
72 def submit(self, fn,
args, kwargs):
---> 73 return fn(*args,
kwargs)
74
75 __synch_executor = SynchExecutor()

/usr/lib/python3/dist-packages/PyTango/device_proxy.py in __DeviceProxy__ping(self, args, kwargs)
968
969 def __DeviceProxy__ping(self,
args, kwargs):
--> 970 return self._ping(*args,
kwargs)
971
972 def __DeviceProxy__state(self, args, *kwargs):

ConnectionFailed: DevFailed[
DevError[
desc = Device mu01 is not exported (hint: try starting the device server)
origin = DeviceProxy::get_corba_name()
reason = API_DeviceNotExported
severity = ERR]
]

Discussion

  • Tiago Coutinho

    Tiago Coutinho - 2014-02-06

    Thanks for reporting.

    Fixed in PyTango SVN trunk since revision #24864
    Will become visible in next PyTango 8.1.2

     
  • Tiago Coutinho

    Tiago Coutinho - 2014-02-07
    • status: open --> closed-fixed
    • assigned_to: Coutinho
     

Log in to post a comment.

MongoDB Logo MongoDB