You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The installed_packages in packages/traceloop-sdk/traceloop/sdk/utils/package_check.py assuming that every distribution's metadata contains a "Name" entry. If a distribution's metadata is missing this entry (or if it is None), attempting to call .lower() on None will result in an AttributeError. This error was not present in older versions of traceloop-sdk and started happening when upgrading to version 34 and above
👟 Reproduction steps
from traceloop.sdk import Instruments
👍 Expected behavior
installed_packages = {
dist.metadata.get("Name", "").lower()
for dist in distributions()
if dist.metadata.get("Name") is not None
}
👎 Actual Behavior with Screenshots
File "/app/venv/lib/python3.11/site-packages/traceloop/sdk/utils/package_check.py", line 3, in <setcomp>
installed_packages = {dist.metadata["Name"].lower() for dist in distributions()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
🤖 Python Version
3.11
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
I checked and didn't find similar issue
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered:
Which component is this bug for?
Traceloop SDK
📜 Description
The installed_packages in packages/traceloop-sdk/traceloop/sdk/utils/package_check.py assuming that every distribution's metadata contains a
"Name"
entry. If a distribution's metadata is missing this entry (or if it isNone
), attempting to call.lower()
onNone
will result in anAttributeError
. This error was not present in older versions of traceloop-sdk and started happening when upgrading to version 34 and above👟 Reproduction steps
from traceloop.sdk import Instruments
👍 Expected behavior
👎 Actual Behavior with Screenshots
🤖 Python Version
3.11
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: