-
Notifications
You must be signed in to change notification settings - Fork 437
TypeError: '<' not supported between instances of 'NoneType' and 'str' #3046
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
Comments
We just had a similar issue on version |
Backport for 0.56 here: #3062 |
We are still having the error in 0.57:
|
Ok, this is weird. Line 493 is:
The error makes since comparison is being used here. StackEventGroupKey = typing.NamedTuple(
"StackEventGroupKey",
[
("thread_id", str),
("thread_native_id", str),
("thread_name", str),
("task_id", str),
("task_name", str),
("local_root_span_id", str),
("span_id", str),
("trace_resource", str),
("trace_type", str),
("frames", HashableStackTraceType),
("nframes", int),
],
) Only @Apakottur do you see 100% of the time or randomly from time to time? |
@jd I see it randomly from time to time, I think. I can't see the contents of
Which calls
Maybe this helps? |
That actually gave me an idea. You might have a stack trace where >>> stack1 = [("somefile", 1, "funcname")]
>>> stack2 = [("somefile", None, "funcname")]
>>> stack1 < stack2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '<' not supported between instances of 'int' and 'NoneType' I'll write up a PR to fix that and make sure all line numbers that are |
…er None In some cases, f_lineno can be `None` which would trigger an error in the pprof output. This is not even caught by mypy, and I've proposed a fix here: python/typeshed#6769 This patch makes sure we always use 0 if the line number is `None`. It also makes sure a funcname is always passed — in practice it's now the case, but make sure typing reflects that. Fixes DataDog#3046
…er None (#3099) In some cases, f_lineno can be `None` which would trigger an error in the pprof output. This is not even caught by mypy, and I've proposed a fix here: python/typeshed#6769 This patch makes sure we always use 0 if the line number is `None`. It also makes sure a funcname is always passed — in practice it's now the case, but make sure typing reflects that. Fixes #3046
Uh oh!
There was an error while loading. Please reload this page.
Infos
We're using DD to monitor our systems. From time to time we see the following errors popping up in our Sentry environment.
Maybe related to #3019?
Which version of dd-trace-py are you using?
0.56.0
Which version of pip are you using?
latest
What is the result that you get?
The text was updated successfully, but these errors were encountered: