-
Notifications
You must be signed in to change notification settings - Fork 555
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
AttributeError: 'NoneType' object has no attribute 'message_types_by_name' #783
Comments
That requirements.txt file doesn’t appear to be complete. It’s missing the full list of transitive dependencies. Can you provide a “locked” set of dependencies? An easy way to produce one is with pip-tools https://github.com/jazzband/pip-tools#example-usage-for-pip-compile or export one from poetry. You can use the compile_pip_requirements repository rule as well https://github.com/bazelbuild/rules_python/blob/main/docs/pip.md#compile_pip_requirements |
@groodt Hey, thanks for the suggestion and I have run pip-compile and get a full list of transitive dependencies as follow. I update my Actually I don't see why this error is related with transitive dependencies and may I know do you have any further suggestion?
|
It appears that the new method of creating a
|
@groodt I double checked the codes and just create a very simple codes sample with only the imports.
while the test.proto is as simple as
Without the proto dependency, everything works fine and I am not sure if this is a Bazel issue or I should ask this question somewhere else? |
Update. Can close. This is fixed by making
instead of
|
AttributeError: 'NoneType' object has no attribute 'message_types_by_name'
Environment details:
Ubuntu 16.04, Python 3.7
Description
I am trying to use the
google-cloud-pubsub
in my codes, but when only testing the imports for all the binaries, the following error shows:Is this a regression?
I don't think so.
Minimal Reproduction
The Build rule for the file:
requiremens.txt as follow:
and in the
hello.py
there are some imports:Found a few relevant issues but their fixes suggestions are not working
E.g. bazel-contrib/rules_jvm_external#240 and #65.
While I added all the transitive dependencies manually & explicitly as follow but still got the same error message above.
E.g. #93
is added to all the
py_pytest_test
andpy_binary
and the issue is still there.The text was updated successfully, but these errors were encountered: