Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

AttributeError: 'Agent' object has no attribute 'token' #264

Open
gasabr opened this issue Sep 17, 2019 · 3 comments
Open

AttributeError: 'Agent' object has no attribute 'token' #264

gasabr opened this issue Sep 17, 2019 · 3 comments

Comments

@gasabr
Copy link

gasabr commented Sep 17, 2019

c = consul.Consul()
new_service = consul.Consul.Agent.Service(c.agent)
new_service.register(config['executor_id'])

Probably, I'm not using the Service correctly here, but still this code causes error in this line
this line

@gasabr
Copy link
Author

gasabr commented Sep 17, 2019

My bad, after reading the code I have realized that agent variable is not consul.Consul.Agent, but consul.Consul.

@poppyred
Copy link

poppyred commented Oct 9, 2019

@gasabr python-consul2 The author may be a little busy, I will maintain a version, welcome to use. The new consul version was used. Progressively implement all API interfaces in the future

@poppyred
Copy link

poppyred commented Oct 9, 2019

@gasabr you maby use like under

 c = consul.Consul(port=acl_consul.port, token=acl_consul.token)
c.agent.service.register('service_name')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants