Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Google cloud logging no longer compatible with protobuf 5.x #899

Description

@ianmclaughlin-po

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version:
    MacOS Sonoma 14
  • Python version: python --version
    python 3.10.8
  • pip version: pip --version
    pip 23.0.1 from /Users/ianmclaughlin/PycharmProjects/.tvenv/lib/python3.10/site-packages/pip (python 3.10)
  • google-cloud-logging version: pip show google-cloud-logging
    Name: google-cloud-logging
    Version: 3.10.0
    Summary: Stackdriver Logging API client library
    Home-page: https://github.com/googleapis/python-logging
    Author: Google LLC
    Author-email: [email protected]
    License: Apache 2.0
    Location: /Users/ianmclaughlin/PycharmProjects/.tvenv/lib/python3.10/site-packages
    Requires: google-api-core, google-auth, google-cloud-appengine-logging, google-cloud-audit-log, google-cloud-core, grpc-google-iam-v1, proto-plus, protobuf
    Required-by:

Steps to reproduce

  1. See code here AttributeError: module 'google._upb._message' has no attribute 'MessageMapContainer' on latest version protocolbuffers/protobuf#16935 (comment)

Code example

# example

Stack trace

  File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 95, in init_process
    super().init_process()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 371, in import_app
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/api/app.py", line 6, in <module>
    import google.cloud.logging
  File "/usr/local/lib/python3.10/site-packages/google/cloud/logging/__init__.py", line 18, in <module>
    from google.cloud.logging_v2 import __version__
  File "/usr/local/lib/python3.10/site-packages/google/cloud/logging_v2/__init__.py", line 21, in <module>
    from google.cloud.logging_v2.client import Client
  File "/usr/local/lib/python3.10/site-packages/google/cloud/logging_v2/client.py", line 25, in <module>
    from google.cloud.logging_v2._helpers import _add_defaults_to_filter
  File "/usr/local/lib/python3.10/site-packages/google/cloud/logging_v2/_helpers.py", line 25, in <module>
    from google.cloud.logging_v2.entries import LogEntry
  File "/usr/local/lib/python3.10/site-packages/google/cloud/logging_v2/entries.py", line 32, in <module>
    import google.cloud.appengine_logging  # noqa: F401
  File "/usr/local/lib/python3.10/site-packages/google/cloud/appengine_logging/__init__.py", line 21, in <module>
    from google.cloud.appengine_logging_v1.types.request_log import (
  File "/usr/local/lib/python3.10/site-packages/google/cloud/appengine_logging_v1/__init__.py", line 21, in <module>
    from .types.request_log import LogLine, RequestLog, SourceLocation, SourceReference
  File "/usr/local/lib/python3.10/site-packages/google/cloud/appengine_logging_v1/types/__init__.py", line 16, in <module>
    from .request_log import LogLine, RequestLog, SourceLocation, SourceReference
  File "/usr/local/lib/python3.10/site-packages/google/cloud/appengine_logging_v1/types/request_log.py", line 23, in <module>
    import proto  # type: ignore
  File "/usr/local/lib/python3.10/site-packages/proto/__init__.py", line 15, in <module>
    from .enums import Enum
  File "/usr/local/lib/python3.10/site-packages/proto/enums.py", line 19, in <module>
    from proto import _file_info
  File "/usr/local/lib/python3.10/site-packages/proto/_file_info.py", line 24, in <module>
    from proto.marshal.rules.message import MessageRule
  File "/usr/local/lib/python3.10/site-packages/proto/marshal/__init__.py", line 15, in <module>
    from .marshal import Marshal
  File "/usr/local/lib/python3.10/site-packages/proto/marshal/marshal.py", line 25, in <module>
    from proto.marshal import compat
  File "/usr/local/lib/python3.10/site-packages/proto/marshal/compat.py", line 43, in <module>
    map_composite_types += (_message.MessageMapContainer,)
AttributeError: module 'google._upb._message' has no attribute 'MessageMapContainer'```

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/python-logging API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions