opentelemetry-instrumentation-urllib log warning on None status code #1401
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
instrumentation
triaged
Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
python:3.10.7
WeasyPrint==52.4
opentelemetry-instrumentation-urllib==0.33b0
'Linux-5.15.0-52-generic-x86_64-with-glibc2.28'
Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.
In my code following log occured
Invalid type NoneType for attribute value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types
.It was caused by
response.code is None. I think that in this case we should not assume that status code is not None.
What is the expected behavior?
Invalid type NoneType for attribute value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types
should not be logged in this case.What is the actual behavior?
What did you see instead?
Invalid type NoneType for attribute value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types
is logged.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: