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
'function' object has no attribute '__callonce_result__' #8068
Comments
This is likely an instance of python/importlib_metadata#455 |
Thanks for the report, I will add a workaround until python/importlib_metadata#455 is fixed, will be backported to 2.4 soon. |
@econno11y one question, is that traceback from the logs? Because the |
Hi @juanjux I'm not sure what If I add a conditional:
The new traceback is:
That doesn't kill the app either, but it does hang. Maybe that gives you a sense of what the calling code is. |
@econno11y could you test if pinning |
I'm having trouble pinning the version to 6.5.0. I made this change in the requirements file:
but here is the resulting dependency tree:
|
If I go and uninstall ddtrace, opentelemetry-api, and importlib-metada and then reinstall importlib-metadata==6.5.0, then opentelemetry-api==1.22.0, then ddtrace==2.4.0, then run the server, I get:
localsettings.py
|
@econno11y can you please post your updated |
@majorgreys when I manually uninstall
|
If I just set the version to |
@econno11y I don't see ddtrace in your pip freeze from #8068 (comment), but the version of importlib-metadata has been pinned as it should. Can you confirm if the pinned version resolved the exception? |
@majorgreys this did not fix the issue. I tried to pin it at 6.5.0 in requirements.txt, like this:
but after deleting my virtual env, reinstalling, reactivating, and running
ddtrace is there now. I throws this series of exceptions and hangs:
|
Checking in on this again. I'm still unable to build. |
I see this #8075. What is the status? |
## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --------- Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com> Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com> Co-authored-by: Zachary Groves <32471391+ZStriker19@users.noreply.github.com>
## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --------- Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com> Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com> Co-authored-by: Zachary Groves <32471391+ZStriker19@users.noreply.github.com> (cherry picked from commit c8d5e9f)
## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --------- Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com> Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com> Co-authored-by: Zachary Groves <32471391+ZStriker19@users.noreply.github.com> (cherry picked from commit c8d5e9f)
## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. --------- Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com> Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com> Co-authored-by: Zachary Groves <32471391+ZStriker19@users.noreply.github.com> (cherry picked from commit c8d5e9f)
Backport c8d5e9f from #8075 to 2.5. ## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Juanjo Alvarez Martinez <juanjo.alvarezmartinez@datadoghq.com>
Backport c8d5e9f from #8075 to 2.3. ## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Juanjo Alvarez Martinez <juanjo.alvarezmartinez@datadoghq.com>
Backport c8d5e9f from #8075 to 2.4. ## Description - Pin importlib to 6.5.0 to avoid issue python/importlib_metadata#455 - Fix a potential unbound local error. Fixes #8068 ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Juanjo Alvarez Martinez <juanjo.alvarezmartinez@datadoghq.com> Co-authored-by: Emmett Butler <723615+emmettbutler@users.noreply.github.com>
Summary of problem
Django project won't start due to ddtrace exception
Which version of dd-trace-py are you using? 2.4.0
Which version of pip are you using?
Which libraries and their versions are you using? 21.2.3
`pip freeze`
aiohttp==3.9.1 aiosignal==1.3.1 amqp==5.2.0 annotated-types==0.6.0 ansimarkup==1.4.0 anyio==3.7.1 ariadne==0.21 ariadne-django==0.3.0 asgiref==3.7.2 asn1crypto==1.5.1 astroid==3.0.2 asttokens==2.4.1 async-timeout==4.0.3 attrs==23.2.0 autobahn==23.6.2 Automat==22.10.0 beautifulsoup4==4.12.2 billiard==3.6.4.0 blessed==1.20.0 boto3==1.24.75 botocore==1.27.75 bytecode==0.15.1 cattrs==23.2.3 celery==5.2.3 certifi==2023.11.17 cffi==1.16.0 cfgv==3.4.0 channels==4.0.0 chardet==5.2.0 charset-normalizer==2.0.12 click==8.1.7 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.3.0 colorama==0.4.6 constantly==23.10.4 coverage==7.4.0 cron-descriptor==1.4.0 cryptography==36.0.2 Cython==3.0.0 daphne==4.0.0 dataclasses-json==0.5.14 datadog-api-client==2.20.0 dateparser==1.2.0 ddsketch==2.0.4 ddtrace==2.4.0 debugpy==1.8.0 decorator==5.1.1 Deprecated==1.2.14 dill==0.3.7 -e git+ssh://git@github.com/ontherivt/personalization.git@78ed9502c81f6b418a44f4ece00cb276942df4ee#egg=discovery distlib==0.3.8 Django==4.2.5 django-allow-cidr==0.7.1 django-axes==5.41.1 django-celery-beat==2.5.0 django-cors-headers==4.3.1 django-extensions==3.2.3 django-ipware==6.0.3 django-postgres-extra==2.0.2 django-prettyjson==0.4.1 django-redis==5.4.0 django-storages==1.14.2 django-timezone-field==6.1.0 djangorestframework==3.14.0 dnspython==2.4.2 drf-extra-fields==3.7.0 editdistance==0.6.0 enforce==0.3.4 envier==0.5.0 exceptiongroup==1.2.0 executing==2.0.1 expiringdict==1.1.4 factory-boy==3.3.0 Faker==22.1.0 filelock==3.13.1 filetype==1.2.0 flake8==7.0.0 flake8-for-pycharm==0.4.1 freezegun==1.4.0 frozenlist==1.4.1 future==0.18.3 geographiclib==2.0 geopy==2.4.1 googleapis-common-protos==1.62.0 googlemaps==4.10.0 graphql-core==3.2.3 grpc-gateway-protoc-gen-openapiv2==0.1.0 grpcio==1.54.2 gunicorn==21.2.0 h11==0.14.0 hyperlink==21.0.0 identify==2.5.33 idna==3.6 importlib-metadata==6.11.0 incremental==22.10.0 iniconfig==2.0.0 ipython==8.18.1 isort==5.13.2 jedi==0.19.1 jmespath==1.0.1 joblib==1.3.2 kafka-python==2.0.2 keyring==21.8.0 kombu==5.3.4 langchain==0.0.270 langsmith==0.0.79 launchdarkly-server-sdk==7.2.0 loguru==0.7.2 lxml==5.1.0 marshmallow==3.20.2 matplotlib-inline==0.1.6 mccabe==0.7.0 mock==5.1.0 more-itertools==8.13.0 multidict==6.0.4 mypy-extensions==1.0.0 nodeenv==1.8.0 numexpr==2.8.8 numpy==1.22.4 openai==0.27.7 opentelemetry-api==1.22.0 oscrypto==1.3.0 packaging==23.2 pandas==1.3.3 parso==0.8.3 pexpect==4.9.0 pinecone-client==2.2.4 pipdeptree==2.13.1 platformdirs==4.1.0 pluggy==1.3.0 pre-commit==3.6.0 probableparsing==0.0.1 progressbar2==4.3.2 prompt-toolkit==3.0.43 protobuf==3.19.6 psycopg2-binary==2.9.1 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.5.1 pyasn1-modules==0.3.0 pycodestyle==2.11.1 pycparser==2.21 pycryptodomex==3.20.0 pydantic==2.5.3 pydantic_core==2.14.6 pyflakes==3.2.0 Pygments==2.17.2 PyJWT==2.8.0 pylint==3.0.3 pyOpenSSL==22.0.0 pyRFC3339==1.1 pysimdjson==5.0.2 pytest==7.4.4 python-crfsuite==0.9.10 python-crontab==3.0.0 python-dateutil==2.8.0 python-dotenv==1.0.0 python-ipware==2.0.1 python-slugify==8.0.1 python-utils==3.8.1 pytz==2023.3.post1 PyYAML==6.0.1 redis==4.1.0 regex==2023.12.25 requests==2.31.0 responses==0.24.1 s3transfer==0.6.2 scikit-learn==1.3.0 scipy==1.11.4 semver==2.13.0 sentry-sdk==1.11.1 service-identity==23.1.0 setproctitle==1.3.3 six==1.16.0 slackclient==2.9.4 sniffio==1.3.0 snowflake-connector-python==2.7.8 soupsieve==2.5 SQLAlchemy==2.0.25 sqlparse==0.4.4 stack-data==0.6.3 standardjson==0.3.1 starlette==0.34.0 structlog==20.1.0 tblib==3.0.0 tenacity==8.2.2 text-unidecode==1.3 textrazor==1.4.0 threadpoolctl==3.2.0 tiktoken==0.5.2 tomli==2.0.1 tomlkit==0.12.3 tqdm==4.66.1 traitlets==5.14.1 Twisted==23.10.0 txaio==23.1.1 typing-inspect==0.9.0 typing_extensions==4.9.0 tzdata==2023.4 tzlocal==5.2 ujson==5.9.0 Unidecode==1.3.7 unittest-xml-reporting==3.2.0 urllib3==1.26.18 urllib3-mock==0.3.3 usaddress==0.5.10 uvicorn==0.17.6 vine==5.1.0 virtualenv==20.25.0 watchgod==0.8.2 wcwidth==0.2.13 websockets==12.0 wrapt==1.16.0 xmltodict==0.13.0 xxhash==3.4.1 yarl==1.9.4 zipp==3.17.0 zope.interface==6.1 zstandard==0.22.0How can we reproduce your problem?
M2 mac
django project
What is the result that you get?
I get the exception pasted above
What is the result that you expected?
That the dependencies would build successfully and the dango server would run
The text was updated successfully, but these errors were encountered: