You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone, sorry if this issue is duplicated, but I didn't find any that addressed the entire process or I am missing something when using protoc instead of buf. I have a python project with a set of protobuf files, I am compiling them with:
Where the include_imports and the descriptor_set_out were set as documented. However, even when I define the PYTHONPATH to the gen file, still does not work, with the following error:
>>> import protovalidate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/venv/lib/python3.11/site-packages/protovalidate/__init__.py", line 15, in <module>
from protovalidate import validator
File "/venv/lib/python3.11/site-packages/protovalidate/validator.py", line 19, in <module>
from buf.validate import expression_pb2 # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'buf'
This is likely because this is not generating the validate_pb2.py but a binary file. So, what is the correct process in order to use protovalidate with protoc in a python project?
Thanks!
The text was updated successfully, but these errors were encountered:
rodaine
changed the title
[BUG] How to use protoc instead of buf in a python project
How to use protoc instead of buf in a python project
Dec 17, 2024
jmspereira
changed the title
How to use protoc instead of buf in a python project
[Question] How to use protoc instead of buf in a python project
Dec 18, 2024
Hey everyone, sorry if this issue is duplicated, but I didn't find any that addressed the entire process or I am missing something when using protoc instead of buf. I have a python project with a set of protobuf files, I am compiling them with:
Where the include_imports and the descriptor_set_out were set as documented. However, even when I define the PYTHONPATH to the gen file, still does not work, with the following error:
This is likely because this is not generating the validate_pb2.py but a binary file. So, what is the correct process in order to use protovalidate with protoc in a python project?
Thanks!
The text was updated successfully, but these errors were encountered: