Skip to content

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

@ghost

Description

  • 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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions