diff --git a/crflux/models.py b/crflux/models.py index 3525dad..2531e6d 100644 --- a/crflux/models.py +++ b/crflux/models.py @@ -1064,9 +1064,12 @@ def __init__(self, spl_fname=None): if fdate(fn) >= fdate(spl_fname): spl_fname = fn spl_fname = os.path.join(base_path, spl_fname) - - self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load( - bz2.BZ2File(spl_fname), encoding='latin1') + try: + self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load( + bz2.BZ2File(spl_fname), encoding='latin1') + except TypeError: + self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load( + bz2.BZ2File(spl_fname)) self.nucleus_ids = [] diff --git a/setup.py b/setup.py index abc9f26..9a7703d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from setuptools import setup -__version__ = "1.0.5" +__version__ = "1.0.6" def setup_package(): from os.path import abspath, dirname, join