-
Notifications
You must be signed in to change notification settings - Fork 4
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
TypeError: unorderable types: str() < int() #1
Comments
@mkevac I'm not having any luck extracting the archive.zip file you added to reproduce this problem ... $ unzip archive.zip bunzip2: (stdin): trailing garbage after EOF ignored ... and the .0 file is not a PCP archive either ... $ pmloglabel 20160701.12.35.0 ? |
This is probably due to the type for indom in pmcd.pmlogger.port. It seems to have two instances one is a string called primary and the other one is an instance ID.
Should I just skip this metric by default or is this a bug somewhere? |
FWIW The reason pcp2pdf barfs is because it assumes that a metric does not change type within indom instance |
From a PCP data semantics perspective, I don't understand this issue here.
it just so happens that the string value of the external name for the first instance is "1909868" which has a numeric interpretation, but that does not imply anything about the string values of the other instances in the instance domain. The type of the metric is something completely different. External instance names only have one type, namely a string. |
InDoms don't have types - only metrics have an associated type that can differ from one to the next. An indom is always composed of tuples of internal identifiers (unsigned integers) and external identifiers (strings). In the case of pmcd.pmlogger.port the metric value is an unsigned integer, always. So, nothing changes here - sounds like this may be a logic error in pcp2pdf dealing with the fact that the string "1909868" (external instance name - always a string) looks like an integer to python? |
I see, thanks. I think (it's been 6 years, so forgive me ;) ) i just fetch all the indoms for a metric and sort them and since one is a string and the other one is a number python barfs. I'll look into this |
No problem.
A metric can only have one indom (instance domain), but an indom may consist of many instances - you refer to the latter I believe (in particular, what we refer to as "external instance identifiers", of which there can be many).
Awesome! |
The text was updated successfully, but these errors were encountered: