I try to search the answer in stackoverflow and try to find something in the github issues but nothing I found. Can anyone give me some tip to solve the problem?
I get the following error when trying to install Google Cloud Logging by pip with docker:
test_web | import google.cloud.logging
test_web | File "/root/site/lib/python3.8/site-packages/google/cloud/logging/__init__.py", line 18, in <module>
test_web | from google.cloud.logging_v2 import __version__
test_web | File "/root/site/lib/python3.8/site-packages/google/cloud/logging_v2/__init__.py", line 25, in <module>
test_web | from google.cloud.logging_v2.client import Client
test_web | File "/root/site/lib/python3.8/site-packages/google/cloud/logging_v2/client.py", line 25, in <module>
test_web | from google.cloud.logging_v2._helpers import _add_defaults_to_filter
test_web | File "/root/site/lib/python3.8/site-packages/google/cloud/logging_v2/_helpers.py", line 25, in <module>
test_web | from google.cloud.logging_v2.entries import LogEntry
test_web | File "/root/site/lib/python3.8/site-packages/google/cloud/logging_v2/entries.py", line 33, in <module>
test_web | from google.iam.v1.logging import audit_data_pb2 # noqa: F401
test_web | File "/root/site/lib/python3.8/site-packages/google/iam/v1/logging/audit_data_pb2.py", line 32, in <module>
test_web | from google.iam.v1 import policy_pb2 as google_dot_iam_dot_v1_dot_policy__pb2
test_web | File "/root/site/lib/python3.8/site-packages/google/iam/v1/policy_pb2.py", line 39, in <module>
test_web | _POLICY = DESCRIPTOR.message_types_by_name["Policy"]
test_web | AttributeError: 'NoneType' object has no attribute 'message_types_by_name'
I have it running in a virtual environment with this in requirements.txt:
google-cloud-logging==3.0.0