Closed LJBD closed 7 years ago
Here is a log without my logger:
/usr/bin/python2.7 /home/tango/PycharmProjects/test/fandango_tests/get_classes_test.py
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/fandango/tango.py", line 217, in get_database_device
td = get_device(dev_name,use_tau=use_tau)
File "/usr/lib/python2.7/site-packages/fandango/tango.py", line 203, in get_device
return PyTango.DeviceProxy(dev)
File "/usr/lib64/python2.7/site-packages/tango/device_proxy.py", line 164, in __DeviceProxy__init__
return DeviceProxy.__init_orig__(self, *args, **kwargs)
ConnectionFailed: DevFailed[
DevError[
desc = TRANSIENT CORBA system exception: TRANSIENT_NoUsableProfile
origin = Connection::connect
reason = API_CorbaException
severity = ERR]
DevError[
desc = Failed to connect to database on host tango with port 10000
origin = Connection::connect
reason = API_CantConnectToDatabase
severity = ERR]
]
ServersDict.WARNING 2017-01-05 16:08:43.852 exception loading Sardana/bl04bm server: get_device_info(dserver/Sardana/bl04bm,Database(tango.bl04.cps.uj.edu.pl, 10000),None): Traceback (m...
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/fandango/servers.py", line 355, in load_from_servers_list
ss.init_from_db(self.db)
File "/usr/lib/python2.7/site-packages/fandango/servers.py", line 109, in init_from_db
di = get_device_info('dserver/'+self.name,db=self._db) #get_server_info() must be combined with get_device_info to obtain the real name of the launcher
File "/usr/lib/python2.7/site-packages/fandango/tango.py", line 253, in get_device_info
dev,db,vals,traceback.format_exc()))
Exception: get_device_info(dserver/Sardana/bl04bm,Database(tango.bl04.cps.uj.edu.pl, 10000),None): Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/fandango/tango.py", line 245, in get_device_info
dd = get_database_device(db=db)
File "/usr/lib/python2.7/site-packages/fandango/tango.py", line 222, in get_database_device
return td
UnboundLocalError: local variable 'td' referenced before assignment
SERV DICT: The status of device servers is:
Ups, it's clearly a problem of hostname resolution
I'm going to try to reproduce and tell you something
Sergi
On 01/05/2017 04:11 PM, Łukasz Dudek wrote:
Here is a log without my logger:
/usr/bin/python2.7/home/tango/PycharmProjects/test/fandango_tests/get_classes_test.py Traceback (most recent call last): File"/usr/lib/python2.7/site-packages/fandango/tango.py", line217,in get_database_device td= get_device(dev_name,use_tau=use_tau) File"/usr/lib/python2.7/site-packages/fandango/tango.py", line203,in get_device return PyTango.DeviceProxy(dev) File"/usr/lib64/python2.7/site-packages/tango/device_proxy.py", line164,in DeviceProxyinit return DeviceProxy.init_orig__(self,*args,**kwargs) ConnectionFailed: DevFailed[ DevError[ desc =TRANSIENT CORBA system exception:TRANSIENT_NoUsableProfile origin = Connection::connect reason =API_CorbaException severity =ERR]
DevError[ desc = Failed to connect to database on host tangowith port10000 origin = Connection::connect reason =API_CantConnectToDatabase severity =ERR] ] ServersDict.WARNING 2017-01-05 16:08:43.852 exception loading Sardana/bl04bm server: get_device_info(dserver/Sardana/bl04bm,Database(tango.bl04.cps.uj.edu.pl,10000),None): Traceback (m... Traceback (most recent call last): File"/usr/lib/python2.7/site-packages/fandango/servers.py", line355,in load_from_servers_list ss.init_from_db(self.db) File"/usr/lib/python2.7/site-packages/fandango/servers.py", line109,in init_from_db di = get_device_info('dserver/'+self.name,db=self._db)#get_server_info() must be combined with get_device_info to obtain the real name of the launcher File"/usr/lib/python2.7/site-packages/fandango/tango.py", line253,in get_device_info dev,db,vals,traceback.format_exc())) Exception: get_device_info(dserver/Sardana/bl04bm,Database(tango.bl04.cps.uj.edu.pl,10000),None): Traceback (most recent call last): File"/usr/lib/python2.7/site-packages/fandango/tango.py", line245,in get_device_info dd= get_database_device(db=db) File"/usr/lib/python2.7/site-packages/fandango/tango.py", line222,in get_database_device return td UnboundLocalError: local variable'td' referenced before assignment
SERV DICT: The status of device serversis:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tango-controls/fandango/issues/2#issuecomment-270666658, or mute the thread https://github.com/notifications/unsubscribe-auth/ARkKqd-a1T6ytUjtroeezJCkq-CD0gQrks5rPQgIgaJpZM4LbxUa.
I just pushed a patch in master; can you update your sources and try again?
The cause of the bug was a workaround to avoid problems in Tango<8; now I made this check conditional to the Tango version.
Sergi
Yes, it's working, thank you very much!
I'm trying to create a ServersDict containing just one dserver. I'm using the following code for that:
It outputs the following things:
It seems that it tries to connect to a Tango Host on
tango:1000
which is not correct - it should use the full name specified in constructor. It also takes really long time to get that information (45 seconds).Can you please verify if that indeed is a problem?