A eureka client written in python. Support registering your python component to Eureka Server, as well as calling remote services by pulling the the Eureka registry.
When using the init method in discovery-mode only, then there is an exception.
Code to execute:
eureka_client.init(eureka_server='https://...', should_register=False, instance_host='something')
Exception:
Attribute Error: 'EurekaClient' object has no attribute '_EurekaClient__instance_host'
I think I have found the reason:
In file eureka_client.py, line 959 the attribute instance_host is accessed, but when should_register=False then the attribute is never set.
If instance_host is not set, then it fails one line earlier with the same message.
When using the init method in discovery-mode only, then there is an exception. Code to execute:
eureka_client.init(eureka_server='https://...', should_register=False, instance_host='something')
Exception: Attribute Error: 'EurekaClient' object has no attribute '_EurekaClient__instance_host'
I think I have found the reason: In file eureka_client.py, line 959 the attribute
instance_host
is accessed, but whenshould_register=False
then the attribute is never set.If instance_host is not set, then it fails one line earlier with the same message.