kragniz / kragniz/python-etcd3

Installing etcd3

Open
#2,242 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
450
Forks
194
PR merge metrics
No merged PRs in 30d

Description

Hi,
I installed the package from directly using `pip install etcd3` and when I import the package, I get the following error:
```
Traceback (most recent call last):
File "", line 1, in
File "/Users/pvw24040/ska_python/lib/python3.11/site-packages/etcd3/__init__.py", line 3, in
import etcd3.etcdrpc as etcdrpc
File "/Users/pvw24040/ska_python/lib/python3.11/site-packages/etcd3/etcdrpc/__init__.py", line 1, in
from .rpc_pb2 import *
File "/Users/pvw24040/ska_python/lib/python3.11/site-packages/etcd3/etcdrpc/rpc_pb2.py", line 16, in
from etcd3.etcdrpc import kv_pb2 as kv__pb2
File "/Users/pvw24040/ska_python/lib/python3.11/site-packages/etcd3/etcdrpc/kv_pb2.py", line 33, in
_descriptor.EnumValueDescriptor(
File "/Users/pvw24040/ska_python/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 796, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
```
Could someone help me with this. I am not sure downgrading the `protobuf` is the best idea here.
I would have hoped it to be straight forward installation

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `pip install etcd3` and a Python import, then inspect the dependency versions involved in `etcd3/etcdrpc/rpc_pb2.py` and `kv_pb2.py`. Check whether the generated protobuf files are compatible with the installed protobuf package; done means a fresh installation imports successfully without requiring a manual workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.