This repository was archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
Install of Snakebite 1.3 with Pipenv gives protobuf errors #249
Copy link
Copy link
Open
Description
Hi,
I know that snakebite 1.3 is unsupported, but I wanted to report this, at least to have a pointer for myself.
Installing snakebite 1.3 with pipenv causes protobuf errors for me when I try to import snakebite.client.
Illustration
First setting up environment:
$ pipenv install 'snakebite<2'
Installing snakebite<2…
Collecting snakebite<2
Collecting argparse (from snakebite<2)
Using cached https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting protobuf>2.4.1 (from snakebite<2)
Using cached https://files.pythonhosted.org/packages/c7/15/e21b9597043ecdc586b76b29608b30212658d239d66407621a642aedb41f/protobuf-3.5.2.post1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already satisfied: setuptools in /Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages (from protobuf>2.4.1->snakebite<2)
Collecting six>=1.9 (from protobuf>2.4.1->snakebite<2)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: argparse, six, protobuf, snakebite
Successfully installed argparse-1.4.0 protobuf-3.5.2.post1 six-1.11.0 snakebite-1.3.13
Adding snakebite<2 to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (61cb98)!
When I now try to import snakebite.client I get this:
$ pipenv run python -c 'import snakebite.client; print "bye"'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages/snakebite/client.py", line 20, in <module>
from snakebite.service import RpcService
File "/Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages/snakebite/service.py", line 16, in <module>
from snakebite.channel import SocketRpcChannel
File "/Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages/snakebite/channel.py", line 53, in <module>
import snakebite.protobuf.datatransfer_pb2 as datatransfer_proto
File "/Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages/snakebite/protobuf/datatransfer_pb2.py", line 15, in <module>
RROR_CHECKSUM\x10\x02\x12\x11\n\rERROR_INVALID\x10\x03\x12\x10\n\x0c\x45RROR_EXISTS\x10\x04\x12\x16\n\x12\x45RROR_ACCESS_TOKEN\x10\x05\x12\x0f\n\x0b\x43HECKSUM_OK\x10\x06\x42>\n%org.apache.hadoop.hdfs.protocol.protoB\x12\x44\x61taTransferProtos\xa0\x01\x01')
File "/Users/stefaan/.local/share/virtualenvs/tmp2-JPL-14RH/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 829, in __new__
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "datatransfer.proto":
SUCCESS: "SUCCESS" is already defined in file "RpcPayloadHeader.proto".
SUCCESS: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "SUCCESS" must be unique within the global scope, not just within "Status".
ERROR: "ERROR" is already defined in file "RpcPayloadHeader.proto".
ERROR: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "ERROR" must be unique within the global scope, not just within "Status".
With standard virtualenv/pip
For reference, using standard virtualenv/pip works:
$ virtualenv-2.7 ve
$ source ve/bin/activate
(ve)$ pip install 'snakebite<2'
Downloading/unpacking snakebite<2
Downloading snakebite-1.3.13.tar.gz (65kB): 65kB downloaded
Running setup.py (path:/Users/stefaan/tmp/snakebite-playground/tmp1/ve/build/snakebite/setup.py) egg_info for package snakebite
Downloading/unpacking protobuf>2.4.1 (from snakebite<2)
Downloading protobuf-3.5.2.post1-py2.py3-none-any.whl (388kB): 388kB downloaded
Downloading/unpacking argparse (from snakebite<2)
Downloading argparse-1.4.0-py2.py3-none-any.whl
Downloading/unpacking six>=1.9 (from protobuf>2.4.1->snakebite<2)
Downloading six-1.11.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./ve/lib/python2.7/site-packages (from protobuf>2.4.1->snakebite<2)
Installing collected packages: snakebite, protobuf, argparse, six
Running setup.py install for snakebite
changing mode of build/scripts-2.7/snakebite from 644 to 755
changing mode of /Users/stefaan/tmp/snakebite-playground/tmp1/ve/bin/snakebite to 755
Successfully installed snakebite protobuf argparse six
Cleaning up...
(ve)$ python -c 'import snakebite.client; print "bye"'
bye
Metadata
Metadata
Assignees
Labels
No labels