Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

python3-protobuf is not compatible with protobuf #526

Open

Description

@omamchich

protobuf is one of the dependencies for google-cloud-bigquery

Once I do pip install google-cloud-bigquery it install protobuf. Then riak library stops working.

I always get the error like this:
File "/usr/local/lib/python3.5/dist-packages/google/protobuf/descriptor.py", line 824, in new
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: expected bytes, str found

The possible solution: seems like protobuf version 3.4 works fine with python 3. So maybe it would be better to use protobuf instead of python3-protobuf

Activity

  1. mvaled commented on Dec 12, 2017

    @mvaled

    Would this be the responsible of:

    Traceback (...)
      ...
      .tox/system/lib/python3.5/site-packages/kaircs/service/fs.py:288: in __setitem__
          self.registers.map.store()
      .tox/system/lib/python3.5/site-packages/riak/datatypes/datatype.py:165: in update
          self.bucket._client.update_datatype(self, **params)
      .tox/system/lib/python3.5/site-packages/riak/client/operations.py:1139: in update_datatype
          include_context=include_context)
      .tox/system/lib/python3.5/site-packages/riak/transports/tcp/transport.py:515: in update_datatype
          msg = codec.encode_update_datatype(datatype, **kwargs)
      .tox/system/lib/python3.5/site-packages/riak/codecs/pbuf.py:1241: in encode_update_datatype
          self.encode_dt_op(type_name, req, op)
      .tox/system/lib/python3.5/site-packages/riak/codecs/pbuf.py:633: in encode_dt_op
          self.encode_map_op(req.op.map_op, op)
      .tox/system/lib/python3.5/site-packages/riak/codecs/pbuf.py:662: in encode_map_op
          update.field.name = str_to_bytes(name)
      .tox/system/lib/python3.5/site-packages/riak/util.py:127: AttributeError
          return value.encode(encoding)
    AttributeError: 'bytes' object has no attribute 'encode'
    
  2. acehko commented on Nov 7, 2018

    @acehko

    I have a similar issue.
    Did anyone find a workaround for this?

  3. mvaled commented on Nov 8, 2018

    @mvaled

    @acehko

    We had to vendorize the riak-python-client into our project and fix it. However, we'll looking for alternatives to RiakKV since it's really dead. We only fixed it for our project (https://github.com/merchise/kaircs).

  4. acehko commented on Nov 8, 2018

    @acehko

    @mvaled
    Thanks. We're also looking for an alternative, but it will be a while before we can completely migrate.

  5. mvaled commented on Nov 8, 2018

    @mvaled

    @acehko Same here. Can you share your candidates list with us? So far, we have considered and discarded Voldemort. We have even implemented a proof-of-concept CRDTs in Python (https://github.com/merchise/xotl.crdt); because our distribution requirements are not the "usual" ones (we don't require more than one server in each datacenter, but we do require fast (nearest) access Europe and America).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions