Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

TypeError: unsupported operand type(s) for &: 'bytes' and 'int' #4

@pomac303

Description

@pomac303

Python version:
python3 --version

Python 3.4.1

pip show protobuf3

Metadata-Version: 1.1
Name: protobuf3
Version: 0.2.0
Summary: Protocol buffers library for Python 3
Home-page: https://github.com/Pr0Ger/protobuf3
Author: Pr0Ger
Author-email: me@pr0ger.org
License: MIT
Location: /usr/lib64/python3.4/site-packages

Requires:

Debug data:
Traceback (most recent call last):
File "./example.py", line 11, in
foo = Message.create_from_bytes(md)
File "/usr/lib64/python3.4/site-packages/protobuf3/message.py", line 180, in create_from_bytes
tmp.parse_from_bytes(bytes_array)
File "/usr/lib64/python3.4/site-packages/protobuf3/message.py", line 173, in parse_from_bytes
self._decode_raw_message(input_iterator)
File "/usr/lib64/python3.4/site-packages/protobuf3/message.py", line 107, in _decode_raw_message
field_signature = Message._decode_field_signature(input_iterator)
File "/usr/lib64/python3.4/site-packages/protobuf3/message.py", line 42, in _decode_field_signature
number = Message._decode_varint(input_iterator)
File "/usr/lib64/python3.4/site-packages/protobuf3/message.py", line 77, in _decode_varint
result.append(next_byte & 0b01111111)

TypeError: unsupported operand type(s) for &: 'bytes' and 'int'

I don't quite know how this should be fixed and why this is not a issue for others... =)

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