@classmethod
    def from_file(cls, file, *args, **kwargs):
        """Try loading given cache file."""
        try:
            cache = shelve.open(file)
            return cls(file, cache, *args, **kwargs)
        except __HOLE__ as e:
            logger.debug("Loading {0} failed".format(file))
            raise e
dataset/ETHPy150Open buckket/twtxt/twtxt/cache.py/Cache.from_file