diff --git a/bookwyrm/apps.py b/bookwyrm/apps.py index d494877d..786f86e1 100644 --- a/bookwyrm/apps.py +++ b/bookwyrm/apps.py @@ -19,11 +19,11 @@ def download_file(url, destination): with open(destination, "b+w") as outfile: outfile.write(stream.read()) except (urllib.error.HTTPError, urllib.error.URLError): - logger.error("Failed to download file %s", url) + logger.info("Failed to download file %s", url) except OSError: - logger.error("Couldn't open font file %s for writing", destination) + logger.info("Couldn't open font file %s for writing", destination) except: # pylint: disable=bare-except - logger.exception("Unknown error in file download") + logger.info("Unknown error in file download") class BookwyrmConfig(AppConfig): diff --git a/bookwyrm/connectors/abstract_connector.py b/bookwyrm/connectors/abstract_connector.py index d8b9c630..56e27388 100644 --- a/bookwyrm/connectors/abstract_connector.py +++ b/bookwyrm/connectors/abstract_connector.py @@ -131,7 +131,7 @@ class AbstractConnector(AbstractMinimalConnector): try: work_data = self.get_work_from_edition_data(data) except (KeyError, ConnectorException) as err: - logger.exception(err) + logger.info(err) work_data = data if not work_data or not edition_data: @@ -270,7 +270,7 @@ def get_data(url, params=None, timeout=10): timeout=timeout, ) except RequestException as err: - logger.exception(err) + logger.info(err) raise ConnectorException(err) if not resp.ok: @@ -278,7 +278,7 @@ def get_data(url, params=None, timeout=10): try: data = resp.json() except ValueError as err: - logger.exception(err) + logger.info(err) raise ConnectorException(err) return data @@ -296,7 +296,7 @@ def get_image(url, timeout=10): timeout=timeout, ) except RequestException as err: - logger.exception(err) + logger.info(err) return None, None if not resp.ok: @@ -305,7 +305,7 @@ def get_image(url, timeout=10): image_content = ContentFile(resp.content) extension = imghdr.what(None, image_content.read()) if not extension: - logger.exception("File requested was not an image: %s", url) + logger.info("File requested was not an image: %s", url) return None, None return image_content, extension diff --git a/bookwyrm/connectors/connector_manager.py b/bookwyrm/connectors/connector_manager.py index 3bdd5cb4..14bb702c 100644 --- a/bookwyrm/connectors/connector_manager.py +++ b/bookwyrm/connectors/connector_manager.py @@ -39,7 +39,7 @@ def search(query, min_confidence=0.1, return_first=False): try: result_set = connector.isbn_search(isbn) except Exception as err: # pylint: disable=broad-except - logger.exception(err) + logger.info(err) # if this fails, we can still try regular search # if no isbn search results, we fallback to generic search @@ -48,7 +48,7 @@ def search(query, min_confidence=0.1, return_first=False): result_set = connector.search(query, min_confidence=min_confidence) except Exception as err: # pylint: disable=broad-except # we don't want *any* error to crash the whole search page - logger.exception(err) + logger.info(err) continue if return_first and result_set: