When checking whether a tab-delimited file is correctly formatted with petablint, having a tab in an empty line produces the following slightly misleading error.
Code: petablint -p Example.tsv
Error: File "/home/Name/anaconda3/bin/petablint", line 8, in <module>
sys.exit(main())
File "/home/Name/anaconda3/lib/python3.8/site-packages/petab/petablint.py", line 164, in main
ret = petab.lint.lint_problem(problem)
File "/home/Name/anaconda3/lib/python3.8/site-packages/petab/lint.py", line 718, in lint_problem
check_parameter_df(problem.parameter_df, problem.sbml_model,
File "/home/Name/anaconda3/lib/python3.8/site-packages/petab/lint.py", line 179, in check_parameter_df
check_ids(df.index.values, kind='parameter')
File "/home/Name/anaconda3/lib/python3.8/site-packages/petab/lint.py", line 851, in check_ids
if not is_valid_identifier(_id):
File "/home/Name/anaconda3/lib/python3.8/site-packages/petab/lint.py", line 836, in is_valid_identifier
return re.match(r'^[a-zA-Z_]\w*$', x) is not None
File "/home/Name/anaconda3/lib/python3.8/re.py", line 191, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object
When checking whether a tab-delimited file is correctly formatted with petablint, having a tab in an empty line produces the following slightly misleading error. Code:
petablint -p Example.tsv
Example.zip