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

[BUG] RCA saving fails if there is a NaN value present #347

Closed
kshitij123456 opened this issue Oct 27, 2021 · 0 comments
Closed

[BUG] RCA saving fails if there is a NaN value present #347

kshitij123456 opened this issue Oct 27, 2021 · 0 comments
Assignees

Comments

@kshitij123456
Copy link
Contributor

Describe the bug

Due to input data having less than 30 rows for a month, when we resample it for the line graph, NaN values can creep up into it. These are then rejected by the database.

Logs

[2021-10-27 12:59:09,636] ERROR in rca_controller: Error in storing output.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/base.py", line 1750, in _execute_context
    self.dialect.do_executemany(
  File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 903, in do_executemany
    context._psycopg2_fetched_rows = xtras.execute_values(
  File "/usr/local/lib/python3.8/dist-packages/psycopg2/extras.py", line 1292, in execute_values
    cur.execute(b''.join(parts))
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type json
LINE 1: ...UES (14, '2021-10-26'::date, 'line', 'mom', NULL, '[{"date":...
                                                             ^
DETAIL:  Token "NaN" is invalid.
CONTEXT:  JSON data, line 1: ....0}, {"date": "2021/10/02 00:00:00", "value": NaN...
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

2 participants