Giter Club home page Giter Club logo

Comments (7)

emcfarlane avatar emcfarlane commented on July 21, 2024 1

This is an issue with the documentation. The wheel file doesn't contain the dependency for the provalidate source files and must be generated. Ensure you follow the guide here to generate with buf.

You should have the following source files locally:

gen
└── buf
    └── validate
        ├── expression_pb2.py
        ├── priv
        │   └── private_pb2.py
        └── validate_pb2.py

Now for python to find this package as buf.validate.expression_pb2 the following env variable is required to be set:

PYTHONPATH=gen

from protovalidate-python.

emcfarlane avatar emcfarlane commented on July 21, 2024 1

Glad you fixed it. It could be due to not having any imports for the validation library. Check your source files have import "buf/validate/validate.proto"; and use the import to validate. Run buf dep update and check that a buf.lock file is generated with a dep on buf.build/bufbuild/protovalidate. Once you start to use the validation library --inlcude-imports should work.

from protovalidate-python.

dobet avatar dobet commented on July 21, 2024

What should I do if I am using python -m grpcio_tools.protoc instead of buf to compile the proto file?

from protovalidate-python.

TakumaKurosawa avatar TakumaKurosawa commented on July 21, 2024

I faced same problem 🙋

from protovalidate-python.

joshuaostrom-cb avatar joshuaostrom-cb commented on July 21, 2024

Seeing the same

from protovalidate-python.

jkruzek avatar jkruzek commented on July 21, 2024

Thanks @emcfarlane . I found that running buf generate --include-imports does not generate the buf folder as expected, however, running buf generate buf.build/bufbuild/protovalidate does generate the proper folder structure. Any ideas why that might be?

from protovalidate-python.

jkruzek avatar jkruzek commented on July 21, 2024

@emcfarlane Thanks! That indeed did fix it. Appreciate the help

from protovalidate-python.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.