Skip to content

Defaults manager does not handle NaN values #2085

@sjanzou

Description

@sjanzou

There is an issue with the handling of NaN values in JSON. When I attempt to add a new variable (with non-NaN value), I get a diff that basically truncates the defaults after the first NaN in the original file. See the attached picture for an example diff.

To reproduce this behavior:

Open SAMOS
Open Defaults Manager
Select “Flat Plate PV,None” in the left sidebar
In “Variable Name”, input use_snow_weather_file
Click query and observe this variable does not exist
Check “Change data type” and “Add variable”.
Set “Data type” to Number and “Enter Numeric Value” to 1
Click Modify
Observe that the deploy/runtime/defaults/Flat Plate PV_None.json is now truncated at line 373, which is the position of the first NaN value.

Image

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions