Skip to content
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

logical_or should not be casting to an int #102

Closed
vlsd opened this issue Mar 7, 2017 · 0 comments
Closed

logical_or should not be casting to an int #102

vlsd opened this issue Mar 7, 2017 · 0 comments

Comments

@vlsd
Copy link
Contributor

vlsd commented Mar 7, 2017

This is an error we get if we try and logical_or timeseries that have None entries. Note that in python None is falsy, so bool(None) returns False. I would expected something called logical_* to cast to a boolean, if casting to anything.

  File "/src/traces/traces/timeseries.py", line 805, in logical_or
    return self.operation(other, lambda x, y: int(x or y))
  File "/src/traces/traces/timeseries.py", line 750, in operation
    result[time] = function(value, other[time])
  File "/src/traces/traces/timeseries.py", line 805, in <lambda>
    return self.operation(other, lambda x, y: int(x or y))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant