param.py
, various errors due to malformed csv file. Poor reporting coming from param.py
#680
Labels
param.py
, various errors due to malformed csv file. Poor reporting coming from param.py
#680
Three problems encountered using
param.py
. There are not really bugs withparam.py
, but were issues with the csv file. However the error handling and reporting to the user is so bad that it is really hard to figure out what the errors with the csv file are. Really need to make the code more flexible and have better error reporting; not sure how to do that yet.Here are the errors:
Problem with finding PFT data in csv file
Solution
The script is very sensitive to the names of the columns. So in the beginning of the PFT section of data (~line 30), the header line must be exactly like this:
Basically make sure all columns are present
Problem with finding
ref_targets
Solution
The script is very picky about the path to the reference targets being complete and correct. So if your reference targets is
/work/calibration/calibration_targets.py
(which is printed out right before the stack trace), then in your .csv file, you need to make sure that the full path is present. In other words your csv should look like this:Notice how rather than simply
calibration_targets.py
, the full path is specified, and that this path matches the line that is printed out immediately before the stack trace in the error.Problem with invalid character
Solution
The script is very picky about having only numeric data in the fields that are expected to be numbers. In the above example, there was a backtick character as pointed out in the
ValueError
message. Searching for this in the csv file revealed it in one of the PFT slots forinitvegnl
. Fixing this (changing to a zero) let the script run.The text was updated successfully, but these errors were encountered: