Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: ConnectionError: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /title/tt1845307/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49f7cced90>: Failed to establish a new connection: [Errno -3] Try again',))

### INFO
**Python Version**: `2.7.14 (default, Dec 14 2017, 15:51:29) [GCC 6.4.0]`
**Operating System**: `Linux-3.10.102-x86_64-with`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.12`
**Commit**: pymedusa/Medusa@4614efc77151ded92ef458a09dec39f8bd5acfc6
**Link to Log**: https://gist.github.com/88030d50149a68e152bf7013d33efa70
### ERROR
<pre>
2018-10-08 20:49:18 ERROR    SHOWQUEUE-ADD :: [4614efc] Error loading IMDb info: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /title/tt1845307/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49f7cced90>: Failed to establish a new connection: [Errno -3] Try again',))
Traceback (most recent call last):
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/medusa/show_queue.py#L587">medusa/show_queue.py</a>", line 587, in run
    self.show.load_imdb_info()
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/medusa/tv/series.py#L1553">medusa/tv/series.py</a>", line 1553, in load_imdb_info
    imdb_info = imdb_api.get_title(self.imdb_id)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/imdbpie/imdbpie.py#L77">ext/imdbpie/imdbpie.py</a>", line 77, in get_title
    self._redirection_title_check(imdb_id)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/imdbpie/imdbpie.py#L326">ext/imdbpie/imdbpie.py</a>", line 326, in _redirection_title_check
    if self.is_redirection_title(imdb_id):
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/imdbpie/imdbpie.py#L334">ext/imdbpie/imdbpie.py</a>", line 334, in is_redirection_title
    response = self.session.get(page_url, allow_redirects=False)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/requests/sessions.py#L525">ext/requests/sessions.py</a>", line 525, in get
    return self.request('GET', url, **kwargs)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/requests/sessions.py#L512">ext/requests/sessions.py</a>", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/requests/sessions.py#L622">ext/requests/sessions.py</a>", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/app/medusa/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/ext/requests/adapters.py#L513">ext/requests/adapters.py</a>", line 513, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='www.imdb.com', port=443): Max retries exceeded with url: /title/tt1845307/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49f7cced90>: Failed to establish a new connection: [Errno -3] Try again',))
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:

Resolving patch:
diff --git a/medusa/show_queue.py b/medusa/show_queue.py
--- a/medusa/show_queue.py
+++ b/medusa/show_queue.py
@@ -64,6 +64,8 @@
 from medusa.logger.adapters.style import BraceAdapter
 from medusa.tv import Series
 
+from requests import RequestException
+
 from six import binary_type, text_type, viewitems
 
 from traktor import TraktException
@@ -587,8 +589,8 @@ def run(self):
             self.show.load_imdb_info()
         except ImdbAPIError as error:
             log.info('Something wrong on IMDb api: {0}', error)
-        except Exception as error:
-            log.error('Error loading IMDb info: {0}', error)
+        except RequestException as error:
+            log.warning('Error loading IMDb info: {0}', error)
 
         try:
             self.show.save_to_db()
@@ -829,7 +831,7 @@ def run(self):
                 '{id}: Something wrong on IMDb api: {error_msg}',
                 {'id': self.show.series_id, 'error_msg': error}
             )
-        except Exception as error:
+        except RequestException as error:
             log.warning(
                 '{id}: Error loading IMDb info: {error_msg}',
                 {'id': self.show.series_id, 'error_msg': error}
@@ -994,7 +996,7 @@ def run(self):
                 '{id}: Something wrong on IMDb api: {error_msg}',
                 {'id': self.show.series_id, 'error_msg': error}
             )
-        except Exception as error:
+        except RequestException as error:
             log.warning(
                 '{id}: Error loading IMDb info: {error_msg}',
                 {'id': self.show.series_id, 'error_msg': error}


Test patch: