strongdm / strongdm-sdk-python

strongDM SDK for the Python programming language.
https://strongdm.github.io/strongdm-sdk-python-docs/
Apache License 2.0
9 stars 8 forks source link

Issue updating redis version with SDM 1.0.35 #9

Closed CamiWhite closed 2 years ago

CamiWhite commented 2 years ago

Hey everyone! I hope you all are doing well. I'm receiving the following error while trying to upgrade Redis version from 3.5.3 to 4.3.1. The current version of strongdm I'm using is 1.0.35.

It seems it has something to do with this error saying google changed something in May.

    from strongdm.errors import RPCError
local-env/lib/python3.9/site-packages/strongdm/__init__.py:21: in <module>
    from .client import *
local-env/lib/python3.9/site-packages/strongdm/client.py:25: in <module>
    from . import svc
local-env/lib/python3.9/site-packages/strongdm/svc.py:19: in <module>
    from . import plumbing
local-env/lib/python3.9/site-packages/strongdm/plumbing.py:21: in <module>
    from google.rpc import status_pb2
local-env/lib/python3.9/site-packages/google/rpc/status_pb2.py:50: in <module>
    _descriptor.FieldDescriptor(
local-env/lib/python3.9/site-packages/google/protobuf/descriptor.py:560: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot not be created directly.
E   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.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E   
E   More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
CamiWhite commented 2 years ago

This is embarrassing, I solve the issue by adding protobuf==3.20.1 as a dependency, just as the error suggested. Sorry for the inconvenience.