Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

TypeError with protobuf 3.0.0, protobuf 3.0.0b2 works #521

Open
nguha opened this issue Mar 3, 2017 · 2 comments
Open

TypeError with protobuf 3.0.0, protobuf 3.0.0b2 works #521

nguha opened this issue Mar 3, 2017 · 2 comments

Comments

@nguha
Copy link

nguha commented Mar 3, 2017

With the current master on Ubuntu 16.04.2 LTS I get:

# python openbazaard.py start --help
Traceback (most recent call last):
  File "openbazaard.py", line 11, in <module>
    from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
  File "/root/OpenBazaar-Server/api/ws.py", line 17, in <module>
    from dht.node import Node
  File "/root/OpenBazaar-Server/dht/node.py", line 8, in <module>
    from protos import objects
  File "/root/OpenBazaar-Server/protos/objects.py", line 17, in <module>
    import countries as countries__pb2
  File "/root/OpenBazaar-Server/protos/countries.py", line 36, in <module>
    type=None),
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 652, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

pip install protobuf==3.0.0b2 fixes this (pointed out by @clehner at #326). Getting back to protobuf==3.0.0 brings the error again.

@Whytehorse
Copy link

Confirmed, 3.0.0b2 resolved this for me. 2.4.1 had some other error. Commands:
sudo -H pip uninstall protobuf
sudo -H pip install protobuf==3.0.0b2

@kharoof
Copy link

kharoof commented Jul 19, 2017

I tried Installing via Digital ocean using https://openbazaar.zendesk.com/hc/en-us/articles/207852873-Guide-to-Setting-up-OpenBazaar-Server-on-a-VPS and I got the following error

Traceback (most recent call last):
 File "openbazaard.py", line 11, in <module>
   from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
 File "/home/user/OpenBazaar-Server/api/ws.py", line 17, in <module>
   from dht.node import Node
 File "/home/user/OpenBazaar-Server/dht/node.py", line 8, in <module>
   from protos import objects
 File "/home/user/OpenBazaar-Server/protos/objects.py", line 17, in <module>
   import countries as countries__pb2
 File "/home/user/OpenBazaar-Server/protos/countries.py", line 36, in <module>
   type=None),
 File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 652, in __new__
   _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

running the following two commands fixed the issue

sudo pip install protobuf==3.0.0b2
sudo pip install requests=2.13.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants