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

Protobuf issue #207

Closed
5A11 opened this issue Jul 19, 2022 · 8 comments
Closed

Protobuf issue #207

5A11 opened this issue Jul 19, 2022 · 8 comments
Assignees

Comments

@5A11
Copy link
Member

5A11 commented Jul 19, 2022

No description provided.

@solarw
Copy link
Contributor

solarw commented Jul 19, 2022

@5A11 Can you add a bit more details on it?

@5A11
Copy link
Member Author

5A11 commented Jul 20, 2022

@MissingNO57 I think you encountered the same issue. Can you provide a description so it can be reproduced?

@5A11
Copy link
Member Author

5A11 commented Jul 20, 2022

Found this relevant report in our internal comms:

Hey team, I was trying to use CosmPy on an osmosis node this morning and I ran into a couple of issues:
1. Default installation still gives me protobuf 4.21, which I need to override with pipenv install protobuf==3.20
2. ...

@5A11
Copy link
Member Author

5A11 commented Jul 20, 2022

Investigate if PR #187 addresses this issue.

@fetchai fetchai deleted a comment from solarw Jul 22, 2022
@solarw
Copy link
Contributor

solarw commented Jul 22, 2022

Prtobuf used by:

cosmpy:

  • protobuf [required: >=3.19.0,<=3.19.4, installed: 3.19.4] - FIXED MANUALLY
  • google-api-python-client requires protobuf [required: >=3.15.0,<5.0.0dev, installed: 3.19.4]
  • grpcio-tools==1.32.0 protobuf [required: >=3.5.0.post1,<4.0dev, installed: 3.19.4]

aea:

  • oef==0.8.1
    • protobuf [required: Any, installed: 3.20.1]
  • tensorflow==2.8.1
    - protobuf [required: >=3.9.2, installed: 3.20.1]
  • web3==5.12.0
    - protobuf [required: >=3.10.0,<4, installed: 3.20.1]
  • yoti==2.14.0
    - protobuf [required: >=3.1.0, installed: 3.20.1]

@solarw
Copy link
Contributor

solarw commented Jul 22, 2022

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python helps to avoid double filre register issue on tests side

but during aea test run see error with TypeError: Parameter to MergeFrom() must be instance of same class: expected cosmos.base.v1beta1.coin_pb2.Coin got cosmos.base.v1beta1.coin_pb2.Coin.
tells there was double import of Coin class.

switching off docstring unit tests helps to test suit run well. so the problem can be caused by pytest tests resolution and importing

@solarw
Copy link
Contributor

solarw commented Jul 27, 2022

the issue was caused by outdated tools used to generate cosmos sdk proto files.
protoc version was 3.13
after update of grpcio-tools (used for generation) and regenerating proto files, issue has gone away.

so problem was: mismatch of generator and python protobuf library

@5A11
Copy link
Member Author

5A11 commented Jul 28, 2022

This is now fixed in #215

@5A11 5A11 closed this as completed Jul 28, 2022
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

2 participants