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

Impossible to see some matrix file in output #1659

Closed
makdeuneuv opened this issue Jul 20, 2023 · 4 comments · Fixed by #1714
Closed

Impossible to see some matrix file in output #1659

makdeuneuv opened this issue Jul 20, 2023 · 4 comments · Fixed by #1714
Assignees
Labels
back-end bug Something isn't working
Milestone

Comments

@makdeuneuv
Copy link
Contributor

makdeuneuv commented Jul 20, 2023

Description

After run a simulation in 1 MC year and synthesis and year-by-year output, I can't see in results view this matrix :

  • id-.txt
  • values-.txt

I got the message below and associates files are present in the output folder

image

When associates files are not presents I got the right message "no data available"
Also see in study version 8.4.2 .

@makdeuneuv makdeuneuv added the bug Something isn't working label Jul 20, 2023
@makdeuneuv makdeuneuv changed the title Impossible to see some matrix file in output of 8.6.1 studies Impossible to see some matrix file in output Jul 20, 2023
@MartinBelthle
Copy link
Contributor

MartinBelthle commented Jul 27, 2023

Indeed, this is due to this PR : #1577, because now the JsonResponse doesn't allow Nan values (file raw_studies_blueprint.py, endpoint GET /studies/uuid/raw), so the code raises an Exception. According to the code documentation, there is a reason to it but I do not understand why you made that change @laurent-laporte-pro ?

@laurent-laporte-pro
Copy link
Contributor

If I understand the user's expectation correctly, this view should display a result matrix containing NaN values. Technically, to display a value table in TSV format, we use a transformation that utilizes JSON format. This format has a limitation: it cannot represent NaN values, just like infinite values. What I don't understand is why the results contain NaN values. One solution would be to replace the invalid values with the strings: 'NaN' '+Inf' and '-Inf'.

@MartinBelthle
Copy link
Contributor

MartinBelthle commented Aug 22, 2023

I discussed with Laurent and it seems that this issue has been resolved with this PR : #1577 thanks to this commit : 8204d45

@MartinBelthle
Copy link
Contributor

MartinBelthle commented Aug 28, 2023

On the 28/08 i encountered the issue again on dev branch. I created a v8.5 study with one area and i launched it. The simulator returned NaN values for hydro level and other columns (which is normal as i did not register any info about hydro in my area). But when i go in the front-end, in the results view i cannot see the matrix. Going to the DEBUG view raises this comment :

ValueError: Out of range float values are not JSON compliant

This comes from line 149 in file raw_studies_blueprint.py :

return JSONResponse(content=output)

This is due to the NaN values in the matrix so i reopen this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants