You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will traceback to an amply error along the lines of:
packages\amply\amply.py", line 308, in eval assert len(self.records[0]) == 1TypeError: object of type 'TabularRecord' has no len()
We should add a check that all definitions in the config file match the definitions once the data has been read in. The error is thrown in the following function. Specifically while the context manager is open and the file is being loaded in.
I confirmed where this becomes an issue. With a parameter removed from the config file, the following table can be generated. Note that the datafile format is otoole, not momani.
from format
to format
Works
Error
csv
datafile
Runs, but does not copy missing data
none
csv
excel
Runs, but does not copy missing data
none
excel
csv
no
OtooleExcelNameMismatchError: AccumulatedAnnualDemand -> Excel tab name not found in config file
excel
datafile
no
OtooleExcelNameMismatchError: AccumulatedAnnualDemand -> Excel tab name not found in config file
datafile
csv
no
AmplyError: Param AccumulatedAnnualDemand not previously defined
datafile
excel
no
AmplyError: Param AccumulatedAnnualDemand not previously defined
The from format excel is the functionality I think we want. While the from format datafile works, I think this issue is only with long formatted data. When the data is wide foratted (momani), then the exception in the issue description in shown. When the from format is csv, no warning is given to the user which isnt great either.
If I have a MathProg data file that has a parameter which is not defined in the
config.yaml
file, otoole breaks. For example, running the command:Will traceback to an amply error along the lines of:
We should add a check that all definitions in the config file match the definitions once the data has been read in. The error is thrown in the following function. Specifically while the context manager is open and the file is being loaded in.
otoole/src/otoole/read_strategies.py
Lines 311 to 325 in 544508d
The text was updated successfully, but these errors were encountered: