timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
117 stars 63 forks source link

nosetest: starmodel.obs is None when running self.emcee_p0() #104

Closed mar-ses closed 4 years ago

mar-ses commented 4 years ago

While running the first nosetest I got this error:

-------------------- >> begin captured logging << -------------------- root: WARNING: kwarg RA=299.268036 ignored! root: ERROR: single starfit calculation failed for /home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/tests/star1. Traceback (most recent call last): File "/home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/starfit.py", line 105, in starfit mod.fit(verbose=verbose, overwrite=overwrite, kwargs) File "/home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/starmodel.py", line 642, in fit return self.fit_mcmc(kwargs) File "/home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/starmodel.py", line 853, in fit_mcmc return self.fit_mcmc_old(**kwargs) File "/home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/starmodel.py", line 909, in fit_mcmc_old p0 = self.emcee_p0(nwalkers) File "/home/sestovic/anaconda3/envs/isochrones/lib/python3.7/site-packages/isochrones/starmodel.py", line 825, in emceep0 for ,n in self.obs.Nstars.items(): AttributeError: 'NoneType' object has no attribute 'Nstars' --------------------- >> end captured logging << ---------------------


Ran 22 tests in 309.146s

FAILED (errors=1)

Is it possible to use isochrones if we ignore this error, or will it happen every time we try to fit something?

mar-ses commented 4 years ago

Ah sorry, it's a copy of this: https://github.com/timothydmorton/isochrones/issues/97

mar-ses commented 4 years ago

Actually I'm still having a problem even after installing MultiNest. I thought it might be the LD_LIBRARY_PATH, since it didn't seem to properly get exported as an environment variable when I put it in .bash_profile. However, even after adding it to .profile, and after manually exporting it (and checking in bash that it's defined correctly), I'm still getting the above error. So I'm not sure what's wrong now.

mar-ses commented 4 years ago

Okay I realised I forgot to read the last line and install pymultinest. Sorry.