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

python3-protobuf is not compatible with protobuf #526

Open
omamchich opened this issue Aug 28, 2017 · 5 comments
Open

python3-protobuf is not compatible with protobuf #526

omamchich opened this issue Aug 28, 2017 · 5 comments

Comments

@omamchich
Copy link

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

@mvaled
Copy link

mvaled commented Dec 12, 2017

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'

@acehko
Copy link

acehko commented Nov 7, 2018

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

@mvaled
Copy link

mvaled commented Nov 8, 2018

@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).

@acehko
Copy link

acehko commented Nov 8, 2018

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

@mvaled
Copy link

mvaled commented Nov 8, 2018

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants