def set_reddit_top_img(self):
        """Wrapper for setting images. Queries known image attributes
        first, then uses Reddit's image algorithm as a fallback.
        """
        try:
            s = images.Scraper(self)
            self.set_top_img(s.largest_image_url())
        except __HOLE__ as e:
            if "Can't convert 'NoneType' object to str implicitly" in e.args[0]:
                log.debug("No pictures found. Top image not set, %s" % e)
            elif "timed out" in e.args[0]:
                log.debug("Download of picture timed out. Top image not set, %s" % e)
            else:
                log.critical('TypeError other than None type error. Cannot set top image using the Reddit algorithm. Possible error with PIL., %s' % e)
        except Exception as e:
            log.critical('Other error with setting top image using the Reddit algorithm. Possible error with PIL, %s' % e)
dataset/ETHPy150Open codelucas/newspaper/newspaper/article.py/Article.set_reddit_top_img