guillochon / MOSFiT

Modular Open Source Fitter for Transients
http://mosfit.readthedocs.io/
MIT License
42 stars 55 forks source link

Crash when `kind` attribute missing in model JSONs #166

Open guillochon opened 6 years ago

guillochon commented 6 years ago

Via @jkobori:

I'm having problem running the latest mosfit. After I upgraded it with pip to the version 1.1.4 I get the following error:

Traceback (most recent call last):
 File "/home/jkobori/.local/bin/mosfit", line 11, in <module>
   sys.exit(main())
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/main.py", line 949, in main
   Fitter(**fitargs).fit_events(**fitargs)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/fitter.py", line 350, in fit_events
   print_trees=print_trees)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/model.py", line 237, in __init__
   self._model, self._trees, self._simple_trees, kinds=root_kinds)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/model.py", line 773, in construct_trees
   depth=depth + 1)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/model.py", line 773, in construct_trees
   depth=depth + 1)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/model.py", line 773, in construct_trees
   depth=depth + 1)
 File "/home/jkobori/.local/lib/python2.7/site-packages/mosfit/model.py", line 736, in construct_trees
   if entry['kind'] in kinds or tag == name:
KeyError: 'kind'