Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'AioClient' object has no attribute 'server_version_sem' My Network Problems? Why? #170

Open
ghost opened this issue Jul 23, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 23, 2022

  • etcd3-py version: 0.1.6
  • Python version: 3.6.8
  • Operating System: CentOS 8.2

Description

I just deploy an etcd cluster with TLS, only use AioClient to put key value into etcd,BUT aioclient create error as below!!

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

import asyncio
import etcd3


async def getFoo(client, key, value):
    await client.put(key, value)
    r = await client.range(key)
    print('key:', r.kvs[0].key, 'value:', r.kvs[0].value)


def main():
    key = "hello"
    value = "world"
    aio_client = etcd3.AioClient("192.168.11.109", 2379, protocol="https",
                                 cert=("cert/server.pem", "cert/server-key.pem,"),
                                 verify="cert/ca.pem", timeout=1000)
    loop = asyncio.get_event_loop()
    loop.run_until_complete(getFoo(aio_client, key, value))


if __name__ == "__main__":
    main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants