-
Notifications
You must be signed in to change notification settings - Fork 86
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
chore(cd): fix protobuf import issue #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool, good work on figuring this out. We should do a rc release on Pypi before the actual release and make sure pull and import works as expected.
I had this problem and had to downgrade. |
What do you mean? I assumed that the import was working for the new release |
Yeah, for some reason it happened to me. I was creating a new cron job(like 1 an half day ago) to delete old data in the telemetry code. |
0cbf160
@MichelDiz When you have a moment could you try to pull |
This fixes protobuf import issues. For more info see #204 .
Problem
Currently, calling
import pydgraph
will complain because of module import path issues. E.g.,This is not a new problem with protobufs. See e.g. [1] [2] [3] [4][5]. Essentially, the issue has to do with the generated protobuf files, which make an import which is not by default discoverable. One trick was to use a relative import path, but this is not a great solution and may be causing issues.
Solution
Use
__init__.py
in the protos package to add the parent directory to the Python path, so that the package will be discovered. This means we no longer have to modify the generated protobuf files.