Our build_snakes function reads two .csv files and expects to see the following columns:
File1: common name, scientific name
File2: scientific name, weight, length
If any of these columns are missing we get messy python errors:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "caduceus/core.py", line 30, in build_snakes
snake.weight = int(row["weight"])
TypeError: int() argument must be a string or a number, not 'NoneType'
We should add error handling to build_snakes so that if a column is missing we exit with a nice error message such as:
"Caduceus expects specific columns in csv files to work. See help(build_snakes) for the specifications"
Our build_snakes function reads two .csv files and expects to see the following columns:
File1: common name, scientific name
File2: scientific name, weight, length
If any of these columns are missing we get messy python errors:
We should add error handling to build_snakes so that if a column is missing we exit with a nice error message such as:
"Caduceus expects specific columns in csv files to work. See help(build_snakes) for the specifications"