DataDog / dd-trace-py

Datadog Python APM Client
https://ddtrace.readthedocs.io/
Other
542 stars 411 forks source link

AttributeError: 'Path' object has no attribute 'parents' #9630

Closed salah93 closed 3 months ago

salah93 commented 3 months ago

Summary of problem

seeing this error pop up in logs, not sure what the effect is

Unable to build package file mapping, please report this to https://github.com/DataDog/dd-trace-py/issues
Traceback (most recent call last):
  File "<path-to-venv>/lib64/python3.8/site-packages/ddtrace/internal/utils/cache.py", line 124, in _
    retval, exc = f.__callonce_result__  # type: ignore[attr-defined]
AttributeError: 'function' object has no attribute '__callonce_result__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<path-to-venv>/lib64/python3.8/site-packages/ddtrace/internal/packages.py", line 154, in _package_for_root_module_mapping
    if is_namespace(f):
  File "<path-to-venv>/lib64/python3.8/site-packages/ddtrace/internal/packages.py", line 136, in is_namespace
    parent = located_f.parents[len(f.parts) - 2]
AttributeError: 'Path' object has no attribute 'parents'

Which version of dd-trace-py are you using?

2.8.5

Which version of pip are you using?

pip 24.0 (python 3.8)

Which libraries and their versions are you using?

aniso8601==9.0.1
arrow==1.3.0
attrs==22.2.0
Babel==2.11.0
boto==2.49.0
braintree==4.28.0
bytecode==0.15.1
cachetools==4.2.4
cattrs==23.1.2
certifi==2024.6.2
cffi==1.16.0
charset-normalizer==2.0.12
click==7.1.2
configparser==3.5.0b2
confluent-kafka==1.9.2
cryptography==36.0.2
datadog==0.43.0
ddsketch==3.0.1
ddtrace==2.8.5
Deprecated==1.2.14
envier==0.5.1
exceptiongroup==1.2.1
Flask==1.1.4
Flask-RESTful==0.3.10
geographiclib==2.0
geopy==2.4.1
idna==3.7
importlib_metadata==7.1.0
itsdangerous==1.1.0
Jinja2==2.11.3
JSON-log-formatter==0.5.2
kazoo==2.10.0
MarkupSafe==2.0.1
opentelemetry-api==1.25.0
orjson==3.10.3
phonenumbers==8.13.37
protobuf==3.19.6
psycopg2-binary==2.9.9
pyasn1==0.6.0
pycparser==2.22
pycrypto==2.6.1
pycryptodome==3.20.0
PyJWT==2.3.0
pylibmc==1.6.3
PyMySQL==1.1.1
python-dateutil==2.9.0.post0
pytz==2024.1
requests==2.27.1
rsa==4.9
shortuuid==1.0.13
six==1.16.0
sqlparse==0.5.0
structlog==21.5.0
twilio==7.8.2
types-python-dateutil==2.9.0.20240316
typing_extensions==4.12.1
urllib3==1.26.18
Werkzeug==1.0.1
wrapt==1.16.0
xmltodict==0.13.0
Yapps==2.2.0
zipp==3.19.1

How can we reproduce your problem?

What is the result that you get?

What is the result that you expected?

salah93 commented 3 months ago

issue was due to yapps package