Load obj with give label from hidden state directory

def load(self, label):
        """ Load obj with give label from hidden state directory """

        objloc = '{0}/{1}'.format(self.statedir, label)

        try:
            obj = pickle.load(open(objloc, 'r')) 
        except (KeyError, IndexError, EOFError):
            obj = open(objloc, 'r').read()
            try:
                obj = float(obj)
            except ValueError:
                pass
        except IOError:
            obj = None

        return obj