Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix sherpa morphology fitting script #337
@olaurino or @DougBurke – We're starting to use Sherpa in Gammapy, and on travis-ci we're getting this AttributeError for
As shown in https://github.com/gammapy/gammapy/blob/master/.travis.yml#L116 we're using
Any ideas what the issue is or how to fix it?
It looks like
@cdeil The issue itself is odd, especially if you don't experience it locally. I'll try and have a look asap.
In the meantime, while it might not fix your issue, you may want to switch to https://conda.binstar.org/sherpa as this is the official channel with the latest release binaries.
If you need a development cut with the latest master code I can probably arrange that, and eventually my plan is to have such development cuts to be automatically generated.
The problem seems to be that the sherpa version you are trying to use (and, for that matter, the latest official release), uses pyfits for I/O. We did add support for astropy (and fall back to pyfits), and that will work if you use the master branch:
There are several options to fix this. I am not sure which one is preferable for you: you could install sherpa from sources, but that's probably overkill, especially since you are using the legacy Travis infrastructure so you cannot cache the build. You could install pyfits via conda to let sherpa have its I/O backend. We do ship a pyfits conda binary in the same channel as sherpa.
I could indeed provide you with a development conda package for Linux64. While I cannot commit to a date, I could try to do that by the end of the week.
I can't double check I am not missing anything obvious, but I believe the following line in your .travis.yml works "by accident":
I could not find the
By the way, Sherpa should support numpy 1.9, if you can trick conda into it, e.g.: