-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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: module 'google._upb._message' has no attribute 'MessageMapContainer' on latest version #16935
Comments
Happens in python 3.9
also. Edit /dd_tracer/python/bin/ddtrace-run gunicorn ... works fine, but /app/datadog-init /dd_tracer/python/bin/ddtrace-run gunicorn ... Doesn't Edit 2: |
@yhs0602 How did you fix that issue with datadog-init? I am pinning protobuf==3.20.3 and still getting issues |
@yhs0602 how did you solve this? |
@doudoujay This is my solution although this seems risky to be deployed to a production environment.
So I found the issue by comparing an old version of my working docker image and new one. Inside my broken container:
Inside my old working container:
Basically datadog-init is bundling it's own python dependencies without pinning them strongly so when the protobuf==5.27.0 was released this causing a conflict. In reality the lower versions of protobuf are not supposed to work with the high versions at all they only happened to be compatible it seems to me. So my original docker image looked like this:
My solution docker image looks like this:
|
my simple solution --
:) |
ddtrace relies on any protobuf >=3
A similar approach we took for the case when we had another dependencies that relies even on older protobuf version (
|
It looks like python proto plus just submitted a change to fix compatibility. Can y'all check to see if that fixes your issue? |
Yes that fixed it for me using the 1.24.0.dev1 release |
thank you, i was able to resolve the issue |
@deannagarcia, This issue can be closed now as a formal release of |
Still have the issue with upgraded libraries |
@anilkumarmyla, Please could you share the full stack trace? Please also share the output of
|
|
Thanks for sharing the stack trace @anilkumarmyla! The stack trace is slightly different from the one in #16935 (comment) in that the error originates from |
@parthea i'm able to reproduce the same using a docker container that has google-cloud-cli rpm package installed. In this setup I'm unable to reproduce if i'm using a venv, but can reproduce on the base system as below
|
A fix was merged in |
@parthea thanks for the fix, do let us know when it makes it into the gcloud release |
I have a python script based on Gemini API SDK working ok till yesterday 2024-09-22
@parthea I did your suggestion:
File ~\AppData\Local\anaconda3\envs\llm-poc\Lib\site-packages\proto\marshal\compat.py:60 AttributeError: module 'google._upb._message' has no attribute 'MessageMapContainer' Any short term fix to allow the project development to resume. Thank you. Benoit |
What version of protobuf and what language are you using?
Version: v27.0
Language: Python
What operating system (Linux, Windows, ...) and version?
Windows
What runtime / compiler are you using (e.g., python version or gcc version)
python in gitlab ci/cd
What did you do?
Steps to reproduce the behavior:
python pip install following packages:
MarkupSafe, werkzeug, click, pathspec, logbook, protobuf, pytz, Babel, text-unidecode, python-slugify, leather, six, isodate, pytimeparse, future, parsedatetime, agate, pkgutil-resolve-name, attrs, rpds-py, referencing, zipp, importlib-resources, jsonschema-specifications, jsonschema, python-dateutil, hologram, pycparser, cffi, charset-normalizer, certifi, urllib3, idna, requests, packaging, Jinja2, typing-extensions, msgpack, mashumaro, minimal-snowplow-tracker, colorama, networkx, dbt-extractor, pyyaml, sqlparse, dbt-core, googleapis-common-protos, proto-plus, pyasn1, rsa, pyasn1-modules, cachetools, google-auth, google-api-core, google-crc32c, google-cloud-core, google-resumable-media, google-cloud-storage, grpcio, grpc-google-iam-v1, google-cloud-dataproc, google-cloud-bigquery, dbt-bigquery, portalocker, platformdirs, tblib, importlib-metadata, distlib, filelock, virtualenv, isolate, isolate-proto, structlog, types-python-dateutil, grpc-interceptor, frozenlist, async-timeout, multidict, yarl, aiosignal, aiohttp, pyjwt, cryptography, auth0-python, opentelemetry-semantic-conventions, wrapt, deprecated, opentelemetry-api, opentelemetry-sdk, pydantic, datadog-api-client, dill, mdurl, markdown-it-py, pygments, rich, sniffio, h11, exceptiongroup, anyio, httpcore, httpx, starlette, fastapi, fal, backports.functools-lru-cache, backoff, monotonic, posthog, greenlet, sqlalchemy, deprecation, astor, agate-sql, numpy, pandas, dbt-fal, slack-sdk, tabulate, pyarrow, db-dtypes
What did you expect to see
compatibility with google APIs
What did you see instead?
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Full error log from gitlab ci/cd job log:
Anything else we should know about your project / environment
using docker image python:3.8.1-slim-buster
The text was updated successfully, but these errors were encountered: