-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
User reported that they created a report for power and irradiance and were met with an unhelpful error message. Users should be informed that units must match until SolarArbiter/solarforecastarbiter-core#514 is resolved.
Currently if units do not match for all pairs in the report, the report creation does not catch the problem and an error is raised at computation. Perhaps this can be addressed by trying to instantiate a data model object from the posted report? This may simplify keeping these restrictions in sync between packages.
Sentry Issue: WORKER-API-4K
ValueError: All units must be identical.
(8 additional frame(s) were not displayed)
...
File "solarforecastarbiter/datamodel.py", line 184, in _single_field_processing
return type_.from_dict(val)
File "solarforecastarbiter/datamodel.py", line 295, in from_dict
return model(**kwargs)
File "<string>", line 12, in __init__
from typing import Tuple, Union, ClassVar
File "solarforecastarbiter/datamodel.py", line 1948, in __post_init__
(k.forecast, k.data_object) for k in self.object_pairs))
File "solarforecastarbiter/datamodel.py", line 1270, in __check_units__
raise ValueError('All units must be identical.')
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request