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

Couldn't build proto file into descriptor pool #8

Closed
wadeira opened this issue Apr 22, 2017 · 14 comments
Closed

Couldn't build proto file into descriptor pool #8

wadeira opened this issue Apr 22, 2017 · 14 comments
Labels

Comments

@wadeira
Copy link

wadeira commented Apr 22, 2017

I'm getting this error when i try to run my program.

from steam import SteamClient
from csgo import CSGOClient

client = SteamClient()
cs = CSGOClient(client)


client.cli_login()
client.run_forever()


@cs.on('ready')
def gc_ready():
	print("Game coordinator is now ready!")


@cs.on('notready')
def gc_notready():
	print("Lost connection to Game Coordinator!")

Traceback (most recent call last):
File "mmrank.py", line 5, in
cs = CSGOClient(client)
File "/usr/local/lib/python2.7/dist-packages/csgo/init.py", line 11, in new
from csgo.client import CSGOClient as CSC
File "/usr/local/lib/python2.7/dist-packages/csgo/client.py", line 13, in
from csgo.features import FeatureBase
File "/usr/local/lib/python2.7/dist-packages/csgo/features/init.py", line 1, in
from csgo.features.match import Match
File "/usr/local/lib/python2.7/dist-packages/csgo/features/match.py", line 1, in
from csgo.enums import ECsgoGCMsg
File "/usr/local/lib/python2.7/dist-packages/csgo/enums.py", line 20, in
_proto_module = import("csgo.protobufs", globals(), locals(), _proto_modules, _level)
File "/usr/local/lib/python2.7/dist-packages/csgo/protobufs/gcsdk_gcmessages_pb2.py", line 17, in
import csgo.protobufs.steammessages_pb2 as steammessages__pb2
File "/usr/local/lib/python2.7/dist-packages/csgo/protobufs/steammessages_pb2.py", line 26, in
dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,])
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 824, in new
return _message.default_pool.AddSerializedFile(serialized_pb)
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "steammessages.proto":
CMsgProtoBufHeader.target_job_name: "CMsgProtoBufHeader.target_job_name" is already defined in file "steammessages_base.proto".
CMsgProtoBufHeader.eresult: "CMsgProtoBufHeader.eresult" is already defined in file "steammessages_base.proto".
CMsgProtoBufHeader.error_message: "CMsgProtoBufHeader.error_message" is already defined in file "steammessages_base.proto".
CMsgProtoBufHeader: "CMsgProtoBufHeader" is already defined in file "steammessages_base.proto".
msgpool_soft_limit: "msgpool_soft_limit" is already defined in file "steammessages_base.proto".
msgpool_hard_limit: "msgpool_hard_limit" is already defined in file "steammessages_base.proto".

@rossengeorgiev
Copy link
Contributor

What OS? Can you also provide the output of pip freeze ?

@wadeira
Copy link
Author

wadeira commented Apr 22, 2017

I'm running Ubuntu 16.04

appdirs==1.4.3
asn1crypto==0.22.0
beautifulsoup4==4.5.3
cffi==1.10.0
cryptography==1.8.1
csgo==0.3.6
enum34==1.1.6
gevent==1.2.1
gevent-eventemitter==2.0
greenlet==0.4.12
idna==2.5
ipaddress==1.0.18
Mako==1.0.3
MarkupSafe==0.23
packaging==16.8
protobuf==3.2.0
pyasn1==0.2.3
pycparser==2.17
pycurl==7.43.0
pyparsing==2.2.0
python-apt==1.1.0b1
requests==2.13.0
rsa==3.4.2
six==1.10.0
speedtest-cli==1.0.2
steam==0.8.17
steampy==0.32
vdf==2.3

@rossengeorgiev
Copy link
Contributor

rossengeorgiev commented Apr 22, 2017

Right, this is an issue with protobuf binary wheels. The work around it to install the pure python implementation or fix proto files, so they don't have namespace collisions.

pip uninstall protobuf
pip install --no-binary=protobuf protobuf

Ref: protocolbuffers/protobuf#2739

@wadeira
Copy link
Author

wadeira commented Apr 22, 2017

It works now, thanks for the help!

@rossengeorgiev
Copy link
Contributor

I've implemented a fix in the way protobufs are compiled. Using the binary protobuf package should work now.

@caimaoy
Copy link

caimaoy commented Jan 15, 2019

@rossengeorgiev I have another question, how to write pip install --no-binary=protobuf protobuf this in requirements.txt file?

@rossengeorgiev
Copy link
Contributor

Hi @caimaoy, that is not possible, but you shouldn't need to.

@ValvePython ValvePython deleted a comment Jun 16, 2019
@wandering-developer
Copy link

I recently ran into this issue while deploying gcp cloud functions in Python. Here is my requirements.txt

jsonschema
protobuf
google-cloud-firestore
google-cloud-logging
apache_beam[gcp]
dependency/dist/schema-registry-client-0.1.1 #this is the private dependency I want to be installed using pip while deployment.

can you please help in solving this issue?

@rossengeorgiev
Copy link
Contributor

@onkarpathak833 See #8 (comment) that is all I know.

@thetrung
Copy link

This thread is a life-saver for protobuf-disaster

@ankitkumar-pi
Copy link

I would recommend you to try :
first
pip uninstall protobuf
second
pip install --no-binary=protobuf protobuf
if working on Jupyter Notebook you can directly try the second

@vilad86
Copy link

vilad86 commented Jan 1, 2024

Да, это проблема с бинарными колесами protobuf. Обойдите эту проблему, чтобы установить чистую реализацию Python или исправить файлы прототипов, чтобы в них не было конфликтов пространства имен.

pip uninstall protobuf
pip install --no-binary=protobuf protobuf

Ссылка: протоколбуферы/protobuf#2739

Hello, I tried your method, and at first I had an error that Microsoft VS C++ 2014 is missing

So I installed BuildTools and downloaded C++ tools, after that I tried to install. Displays an error
(Python 3.11.5)

      ...
      [other lines]
      python\descriptor.c(370): fatal error C1003: зЁб«® ®иЁЎ®Є ЇаҐўли Ґв 100; ®бв ­®ўЄ  Є®¬ЇЁ«пжЁЁ
      error: command 'C:\\PATH_TO_MVS\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for protobuf
Failed to build protobuf
ERROR: Could not build wheels for protobuf, which is required to install pyproject.toml-based projects```

@shokolatY
Copy link

Да, это проблема с бинарными колесами protobuf. Обойдите эту проблему, чтобы установить чистую реализацию Python или исправить файлы прототипов, чтобы в них не было конфликтов пространства имен.

pip uninstall protobuf
pip install --no-binary=protobuf protobuf

Ссылка: протоколбуферы/protobuf#2739

Hello, I tried your method, and at first I had an error that Microsoft VS C++ 2014 is missing

So I installed BuildTools and downloaded C++ tools, after that I tried to install. Displays an error (Python 3.11.5)

      ...
      [other lines]
      python\descriptor.c(370): fatal error C1003: зЁб«® ®иЁЎ®Є ЇаҐўли Ґв 100; ®бв ­®ўЄ  Є®¬ЇЁ«пжЁЁ
      error: command 'C:\\PATH_TO_MVS\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for protobuf
Failed to build protobuf
ERROR: Could not build wheels for protobuf, which is required to install pyproject.toml-based projects```

hello, did you manage to solve this problem?

@vilad86
Copy link

vilad86 commented Jan 31, 2024

Да, это проблема с бинарными колесами protobuf. Обойдите эту проблему, чтобы установить чистую реализацию Python или исправить файлы прототипов, чтобы в них не было конфликтов пространства имен.

pip uninstall protobuf
pip install --no-binary=protobuf protobuf

Ссылка: протоколбуферы/protobuf#2739

Hello, I tried your method, and at first I had an error that Microsoft VS C++ 2014 is missing
So I installed BuildTools and downloaded C++ tools, after that I tried to install. Displays an error (Python 3.11.5)

      ...
      [other lines]
      python\descriptor.c(370): fatal error C1003: зЁб«® ®иЁЎ®Є ЇаҐўли Ґв 100; ®бв ­®ўЄ  Є®¬ЇЁ«пжЁЁ
      error: command 'C:\\PATH_TO_MVS\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for protobuf
Failed to build protobuf
ERROR: Could not build wheels for protobuf, which is required to install pyproject.toml-based projects```

hello, did you manage to solve this problem?

No

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

No branches or pull requests

8 participants