ibpsa / project1-boptest

Building Optimization Performance Tests
Other
102 stars 66 forks source link

SyntaxError: JSON.parse: unexpected character at line 1 column 268 of the JSON data for testcase2 #540

Closed kefeimo closed 1 year ago

kefeimo commented 1 year ago

Description (How to reproduce)

For

When using curl http://127.0.0.1:5000/kpi, image

it returns raw json

{"message":"Queried KPIs successfully.","payload":{"cost_tot":0.005221328521720328,"emis_tot":0.013053321304300819,"ener_tot":0.026106642608601637,"idis_tot":0.0,"pdih_tot":null,"pele_tot":0.037526602248043876,"pgas_tot":null,"tdis_tot":2.0119814359592807,"time_rat":NaN},"status":200}

Note the return is not a valid json due to "time_rat":NaN

Expected Result

Return valid Json.

dhblum commented 1 year ago

Closed by https://github.com/ibpsa/project1-boptest/pull/543.