Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: ValueError: invalid literal for int() with base 10: ''
### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-8.0`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.8`
**Commit**: pymedusa/Medusa@f971a8ce45008e3c3ddc6ede4a602b16db123cbf
**Link to Log**: https://gist.github.com/38875ed7ff1eb6d81f0bed33db949c7d
### ERROR
<pre>
2017-09-24 20:44:18 ERROR    Thread-18 :: [f971a8c] Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/home/pi/Medusa/<a href="../blob/f971a8ce45008e3c3ddc6ede4a602b16db123cbf/medusa/server/web/core/base.py#L258">medusa/server/web/core/base.py</a>", line 258, in async_call
    result = function(**kwargs)
  File "/home/pi/Medusa/<a href="../blob/f971a8ce45008e3c3ddc6ede4a602b16db123cbf/medusa/server/web/home/handler.py#L1036">medusa/server/web/home/handler.py</a>", line 1036, in pickManualSearch
    ep_objs.append(show_obj.get_episode(int(cached_result[b'season']), int(episode)))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


Discussion:
That happened on manual snatch, right? You made a manual episode search, but snatched a season?

### INFO
**Python Version**: `2.7.14 (default, May 28 2018, 14:47:18) [GCC 4.7.3 20130102 (prerelease)]`
**Operating System**: `Linux-3.10.105-x86_64-with-glibc2.2.5`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/5a08076350d2660dfe545ff7cbfc9105
### ERROR
<pre>
2018-06-27 06:59:39 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [Yggtorrent] :: [c65ca26] Failed parsing provider.
Traceback (most recent call last):
  File "/volume1/@appstore/sickbeard-custom/var/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/SickBeard/medusa/helper/common.py#L319">SickBeard/medusa/helper/common.py</a>", line 319, in try_int
    return int(candidate)
ValueError: invalid literal for int() with base 10: '705.68Mo'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]`
**Operating System**: `Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@8cea718e0e623453074f1c2e7965ec1e03080761
**Link to Log**: https://gist.github.com/d39cf044acf125de0d69410a5d4584f9
### ERROR
<pre>
2018-06-28 11:11:39 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [Yggtorrent] :: [8cea718] Failed parsing provider.
Traceback (most recent call last):
  File "/media/NAS/Medusa/<a href="../blob/8cea718e0e623453074f1c2e7965ec1e03080761/medusa/helper/common.py#L328">medusa/helper/common.py</a>", line 328, in try_int
    return int(candidate)
ValueError: invalid literal for int() with base 10: '6.56Go'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

Fixed with: https://github.com/pymedusa/Medusa/pull/4491

### INFO
**Python Version**: `2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]`
**Operating System**: `Linux-3.16.0-5-amd64-x86_64-with-debian-8.10`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/570a4b502e176643e9981e36c33fb941
### ERROR
<pre>
2018-07-01 13:42:36 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [Yggtorrent] :: [c65ca26] Failed parsing provider.
Traceback (most recent call last):
  File "/srv/medusa/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/medusa/helper/common.py#L319">medusa/helper/common.py</a>", line 319, in try_int
    return int(candidate)
ValueError: invalid literal for int() with base 10: '286.52Mo'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]`
**Operating System**: `Linux-3.16.0-5-amd64-x86_64-with-debian-8.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/e160a8834ed3bc2a83d4709ed9d13c4a
### ERROR
<pre>
2018-07-02 11:46:57 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [Yggtorrent] :: [c65ca26] Failed parsing provider.
Traceback (most recent call last):
  File "/srv/medusa/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/medusa/helper/common.py#L319">medusa/helper/common.py</a>", line 319, in try_int
    return int(candidate)
ValueError: invalid literal for int() with base 10: '1.71Go'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.14 (default, May 28 2018, 14:47:18) [GCC 4.7.3 20130102 (prerelease)]`
**Operating System**: `Linux-3.10.105-x86_64-with-glibc2.2.5`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.12`
**Commit**: pymedusa/Medusa@4614efc77151ded92ef458a09dec39f8bd5acfc6
**Link to Log**: https://gist.github.com/8f9c6f1a69717e9ef1814a54bd16ffaa
### ERROR
<pre>
2018-10-19 17:16:24 ERROR    Thread_5 :: [4614efc] Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/medusa/server/web/core/base.py#L259">medusa/server/web/core/base.py</a>", line 259, in async_call
    result = function(**kwargs)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/4614efc77151ded92ef458a09dec39f8bd5acfc6/medusa/server/web/config/general.py#L124">medusa/server/web/config/general.py</a>", line 124, in saveGeneral
    app.WEB_PORT = int(web_port)
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.13 (default, Apr 11 2017, 16:05:39) [GCC 4.8.4]`
**Operating System**: `Linux-4.2.8-x86_64-with-glibc2.2.5`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@b34f1df336e52cf0a690acbc393440ac9f8b3581
**Link to Log**: https://gist.github.com/a4ba710581f44279cbee70bae0e5be92
### ERROR
<pre>
2019-03-20 20:36:28 ERROR    MAIN :: [b34f1df] There was an error creating the show in : Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/__main__.py#L2122">medusa/__main__.py</a>", line 2122, in load_shows_from_db
    cur_show = Series(sql_show['indexer'], sql_show['indexer_id'])
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/tv/series.py#L201">medusa/tv/series.py</a>", line 201, in __init__
    'external', 'imdb_info'})
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/tv/base.py#L38">medusa/tv/base.py</a>", line 38, in __init__
    self.indexer = int(indexer)
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

@gilly65 Please upload your `main.db` to https://send.firefox.com/
Thanks for the quick reply, I have uploaded the file.

https://send.firefox.com/download/60f9da853e/#OLSMeDDeq1ayX4ueqDdZ9w
[https://send.firefox.com/send-fb.358d4b57.jpg]<https://send.firefox.com/download/60f9da853e/#OLSMeDDeq1ayX4ueqDdZ9w>

Firefox Send<https://send.firefox.com/download/60f9da853e/#OLSMeDDeq1ayX4ueqDdZ9w>
Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.
send.firefox.com




________________________________
From: Dario <notifications@github.com>
Sent: March 21, 2019 7:22 AM
To: pymedusa/Medusa
Cc: Gilly; Mention
Subject: Re: [pymedusa/Medusa] [APP SUBMITTED]: ValueError: invalid literal for int() with base 10: '' (#3134)


@gilly65<https://github.com/gilly65> Please upload your main.db to https://send.firefox.com/

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/pymedusa/Medusa/issues/3134#issuecomment-475176375>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADy7I7KA5-rcr2ZzjzvU_3hx4oKAGOULks5vY11MgaJpZM4PiAZG>.


### INFO
**Python Version**: `2.7.13 (default, Apr 11 2017, 16:05:39) [GCC 4.8.4]`
**Operating System**: `Linux-4.2.8-x86_64-with-glibc2.2.5`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@b34f1df336e52cf0a690acbc393440ac9f8b3581
**Link to Log**: https://gist.github.com/01263e3153411ea063c823140678425d
### ERROR
<pre>
2019-03-27 16:52:41 ERROR    MAIN :: [b34f1df] There was an error creating the show in : Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/__main__.py#L2122">medusa/__main__.py</a>", line 2122, in load_shows_from_db
    cur_show = Series(sql_show['indexer'], sql_show['indexer_id'])
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/tv/series.py#L201">medusa/tv/series.py</a>", line 201, in __init__
    'external', 'imdb_info'})
  File "/share/CACHEDEV1_DATA/.qpkg/Medusa/Medusa/<a href="../blob/b34f1df336e52cf0a690acbc393440ac9f8b3581/medusa/tv/base.py#L38">medusa/tv/base.py</a>", line 38, in __init__
    self.indexer = int(indexer)
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

@gilly65 
Sorry, totally forgot about your issue. Can you upload it again to https://send.firefox.com/ and send the link please?
https://send.firefox.com/download/4c8cdc8e92be2855/#IsGktxT8zrDWtZTMcdCFvg
[https://send.firefox.com/send-fb.358d4b57.jpg]<https://send.firefox.com/download/4c8cdc8e92be2855/#IsGktxT8zrDWtZTMcdCFvg>

Firefox Send<https://send.firefox.com/download/4c8cdc8e92be2855/#IsGktxT8zrDWtZTMcdCFvg>
Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.
send.firefox.com


________________________________
From: Dario <notifications@github.com>
Sent: March 28, 2019 8:33 AM
To: pymedusa/Medusa
Cc: Gilly; Mention
Subject: Re: [pymedusa/Medusa] [APP SUBMITTED]: ValueError: invalid literal for int() with base 10: '' (#3134)


@gilly65<https://github.com/gilly65>
Sorry, totally forgot about your issue. Can you upload it again to https://send.firefox.com/ and send the link please?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/pymedusa/Medusa/issues/3134#issuecomment-477558047>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADy7I-2EldaowyjDsp2dSncnHnD0lQwnks5vbKiQgaJpZM4PiAZG>.

@gilly65 
Here you go: https://send.firefox.com/download/f36af5c5175bd73f/#aj8EEetTNTXhWKhX8V4MPQ
For some reason there was a corrupted entry in one of the DB tables, I removed it.
Dang, that was quick, thanks very much!
________________________________
From: Dario <notifications@github.com>
Sent: March 28, 2019 9:17 AM
To: pymedusa/Medusa
Cc: Gilly; Mention
Subject: Re: [pymedusa/Medusa] [APP SUBMITTED]: ValueError: invalid literal for int() with base 10: '' (#3134)


@gilly65<https://github.com/gilly65>
Here you go: https://send.firefox.com/download/f36af5c5175bd73f/#aj8EEetTNTXhWKhX8V4MPQ
For some reason there was a corrupted entry in one of the DB tables, I removed it.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://github.com/pymedusa/Medusa/issues/3134#issuecomment-477570976>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADy7I-RvLo_3T9xnE6GzQV5_yeyfdAO8ks5vbLLbgaJpZM4PiAZG>.


### INFO
**Python Version**: `3.7.3rc1 (default, Mar 13 2019, 11:01:15) [GCC 8.2.0]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-buster-sid`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@2293d228b35e880f4f2e7288e0b3a862e8a79066
**Link to Log**: https://gist.github.com/cc4846f9b6a0d021d7a5d9fb6a7b859f
### ERROR
<pre>
2019-05-15 09:02:31 ERROR    SEARCHQUEUE-DAILY-SEARCH :: [BTDB] :: [2293d22] Failed parsing provider.
Traceback (most recent call last):
  File "/home/pi/Medusa/<a href="../blob/2293d228b35e880f4f2e7288e0b3a862e8a79066/medusa/providers/torrent/html/btdb.py#L118">medusa/providers/torrent/html/btdb.py</a>", line 118, in parse
    seeders = int(spans[3].get_text())
ValueError: invalid literal for int() with base 10: '1,463'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/49a154925cc0fd99f757cf0e34524305
### ERROR
<pre>
2019-08-02 21:21:16 ERROR    Thread_1 :: [74c3f12] Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/server/web/core/base.py#L261">medusa\server\web\core\base.py</a>", line 261, in async_call
    result = function(**kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/server/web/home/post_process.py#L55">medusa\server\web\home\post_process.py</a>", line 55, in processEpisode
    ignore_subs=argToBool(ignore_subs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/process_tv.py#L145">medusa\process_tv.py</a>", line 145, in process
    ignore_subs=ignore_subs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/process_tv.py#L335">medusa\process_tv.py</a>", line 335, in process_files
    self.process_media(path, self.video_files, force, is_priority, ignore_subs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/process_tv.py#L556">medusa\process_tv.py</a>", line 556, in process_media
    self.result = processor.process()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/post_processor.py#L1144">medusa\post_processor.py</a>", line 1144, in process
    ep_obj.series.write_metadata(True)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1326">medusa\tv\series.py</a>", line 1326, in __get_images
    fanart_result = metadata_provider.create_fanart(self) or fanart_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L337">medusa\metadata\generic.py</a>", line 337, in create_fanart
    return self.save_fanart(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L560">medusa\metadata\generic.py</a>", line 560, in save_fanart
    fanart_data = self._retrieve_show_image(u'fanart', show_obj, which=which)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L773">medusa\metadata\generic.py</a>", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/30f194b778dafb41d4862180c4324903
### ERROR
<pre>
2019-08-03 03:01:31 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 76808: Error while refreshing show Whose Line Is It Anyway? (US). Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/2d237f86bb16b2194e0d872c8202a52b
### ERROR
<pre>
2019-08-03 03:01:26 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 247897: Error while refreshing show Homeland. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/6772efe635728ff1decf065b271f68bc
### ERROR
<pre>
2019-08-03 03:01:23 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 161511: Error while refreshing show Shameless (US). Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/50f4c91c93733e60014211de85648327
### ERROR
<pre>
2019-08-03 03:01:21 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 317479: Error while refreshing show VICE News Tonight. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L688">medusa\show_queue.py</a>", line 688, in run
    self.show.refresh_dir()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1792">medusa\tv\series.py</a>", line 1792, in refresh_dir
    self.load_episodes_from_dir()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1053">medusa\tv\series.py</a>", line 1053, in load_episodes_from_dir
    cur_episode = self.make_ep_from_file(os.path.join(self.location, media_file))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1419">medusa\tv\series.py</a>", line 1419, in make_ep_from_file
    root_ep.create_meta_files()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/episode.py#L1126">medusa\tv\episode.py</a>", line 1126, in create_meta_files
    self.__create_nfo(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/episode.py#L1140">medusa\tv\episode.py</a>", line 1140, in __create_nfo
    result = metadata_provider.create_episode_metadata(self) or result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L283">medusa\metadata\generic.py</a>", line 283, in create_episode_metadata
    return self.write_ep_file(ep_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L492">medusa\metadata\generic.py</a>", line 492, in write_ep_file
    data = self._ep_data(ep_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/kodi_12plus.py#L220">medusa\metadata\kodi_12plus.py</a>", line 220, in _ep_data
    series_obj = self._get_show_data(ep_obj.series)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/b64cf0f06f6950924dabe1f6a2f6afbb
### ERROR
<pre>
2019-08-03 03:01:15 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 72231: Error while refreshing show Real Time with Bill Maher. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/0172a8c434c3bf0f5d83a281fbc2c5c0
### ERROR
<pre>
2019-08-03 03:01:10 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 247808: Error while refreshing show Suits. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Program Files\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17763-SP0`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/f54a3ce029ba233447cf11a426a5cc5e
### ERROR
<pre>
2019-08-03 04:02:32 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 295760: Error while refreshing show DC's Legends of Tomorrow. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L691">medusa\show_queue.py</a>", line 691, in run
    self.show.write_metadata()
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L973">medusa\tv\series.py</a>", line 973, in write_metadata
    self.__get_images(metadata_provider)
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1330">medusa\tv\series.py</a>", line 1330, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L378">medusa\metadata\generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L614">medusa\metadata\generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L818">medusa\metadata\generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa\metadata\generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa\indexers\indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa\indexers\tvdbv2\fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "C:\Medusa\Medusa\<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa\indexers\tvdbv2\tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.16 (default, May  6 2019, 19:28:45) [GCC 8.3.0]`
**Operating System**: `Linux-3.10.105-x86_64-with`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@
**Link to Log**: https://gist.github.com/ba669cb82ab0a5602991b3da2047e22f
### ERROR
<pre>
2019-08-04 15:12:33 ERROR    Thread_5 :: [] Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/app/medusa/medusa/server/web/core/base.py", line 261, in async_call
    result = function(**kwargs)
  File "/app/medusa/medusa/server/web/manage/handler.py", line 759, in massUpdate
    image_cache.replace_images(series_obj)
  File "/app/medusa/medusa/image_cache.py", line 167, in replace_images
    fill_cache(series_obj)
  File "/app/medusa/medusa/image_cache.py", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/app/medusa/medusa/image_cache.py", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/app/medusa/medusa/metadata/generic.py", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/app/medusa/medusa/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/app/medusa/medusa/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/app/medusa/medusa/indexers/tvdbv2/tvdbv2_api.py", line 610, in _get_show_data
    self._parse_images(sid)
  File "/app/medusa/medusa/indexers/tvdbv2/fallback.py", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/app/medusa/medusa/indexers/tvdbv2/tvdbv2_api.py", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.16 (default, May  6 2019, 19:28:45) [GCC 8.3.0]`
**Operating System**: `Linux-3.10.105-x86_64-with`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@
**Link to Log**: https://gist.github.com/857e8b1fdcd321b2281e104a7f5cdddc
### ERROR
<pre>
2019-08-04 20:10:45 ERROR    Thread_8 :: [] Exception generated: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/app/medusa/medusa/server/web/core/base.py", line 261, in async_call
    result = function(**kwargs)
  File "/app/medusa/medusa/server/web/manage/handler.py", line 759, in massUpdate
    image_cache.replace_images(series_obj)
  File "/app/medusa/medusa/image_cache.py", line 167, in replace_images
    fill_cache(series_obj)
  File "/app/medusa/medusa/image_cache.py", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/app/medusa/medusa/image_cache.py", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/app/medusa/medusa/metadata/generic.py", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/app/medusa/medusa/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/app/medusa/medusa/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/app/medusa/medusa/indexers/tvdbv2/tvdbv2_api.py", line 610, in _get_show_data
    self._parse_images(sid)
  File "/app/medusa/medusa/indexers/tvdbv2/fallback.py", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/app/medusa/medusa/indexers/tvdbv2/tvdbv2_api.py", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]`
**Operating System**: `Linux-4.18.0-25-generic-x86_64-with-Ubuntu-18.04-bionic`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/2f1fc87ff1dd2652f1c5ac4a16432168
### ERROR
<pre>
2019-08-05 04:05:06 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 362415: Error while refreshing show Four Weddings and a Funeral. Error: invalid literal for int() with base 10: 'original'
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 692, in run
    self.show.populate_cache()
  File "/opt/**********/**********/tv/series.py", line 1779, in populate_cache
    image_cache.fill_cache(self)
  File "/opt/**********/**********/image_cache.py", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/opt/**********/**********/image_cache.py", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/opt/**********/**********/metadata/generic.py", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 610, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 514, in _parse_images
    self._save_images(sid, _images)
  File "/opt/**********/**********/indexers/indexer_base.py", line 392, in _save_images
    self._save_images_by_type(img_type, series_id, images_by_type)
  File "/opt/**********/**********/indexers/indexer_base.py", line 261, in _save_images_by_type
    available_res = sorted(list(images), key=lambda x: int(x.split('x')[0]) * int(x.split('x')[1]))
  File "/opt/**********/**********/indexers/indexer_base.py", line 261, in <lambda>
    available_res = sorted(list(images), key=lambda x: int(x.split('x')[0]) * int(x.split('x')[1]))
ValueError: invalid literal for int() with base 10: 'original'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.14 (default, May 28 2018, 14:46:53) [GCC 4.6.3]`
**Operating System**: `Linux-3.2.40-i686-with-glibc2.0`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: https://gist.github.com/85a6ccc9093d3f4b590057eb29373943
### ERROR
<pre>
2019-08-04 02:11:50 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 361315: Error while refreshing show Batwoman. Error: invalid literal for int() with base 10: 'original'
Traceback (most recent call last):
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L692">medusa/show_queue.py</a>", line 692, in run
    self.show.populate_cache()
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1779">medusa/tv/series.py</a>", line 1779, in populate_cache
    image_cache.fill_cache(self)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/image_cache.py#L339">medusa/image_cache.py</a>", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/image_cache.py#L262">medusa/image_cache.py</a>", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L773">medusa/metadata/generic.py</a>", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa/metadata/generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa/indexers/indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa/indexers/tvdbv2/fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L514">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 514, in _parse_images
    self._save_images(sid, _images)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L392">medusa/indexers/indexer_base.py</a>", line 392, in _save_images
    self._save_images_by_type(img_type, series_id, images_by_type)
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L261">medusa/indexers/indexer_base.py</a>", line 261, in _save_images_by_type
    available_res = sorted(list(images), key=lambda x: int(x.split('x')[0]) * int(x.split('x')[1]))
  File "/volume1/@appstore/sickbeard-custom/var/SickBeard/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L261">medusa/indexers/indexer_base.py</a>", line 261, in <lambda>
    available_res = sorted(list(images), key=lambda x: int(x.split('x')[0]) * int(x.split('x')[1]))
ValueError: invalid literal for int() with base 10: 'original'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]`
**Operating System**: `Linux-4.15.0-55-generic-x86_64-with-Ubuntu-18.04-bionic`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: **No Log available**
### ERROR
<pre>
2019-08-04 03:02:29 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 335982: Error while refreshing show Siren (2018). Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 692, in run
    self.show.populate_cache()
  File "/opt/**********/**********/tv/series.py", line 1779, in populate_cache
    image_cache.fill_cache(self)
  File "/opt/**********/**********/image_cache.py", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/opt/**********/**********/image_cache.py", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/opt/**********/**********/metadata/generic.py", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 610, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.6.5 (default, Mar 20 2019, 04:31:43) [GCC 4.9.2]`
**Operating System**: `Linux-2.6.32-042stab133.2-x86_64-with-debian-8.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@74c3f124fb599ad923e23f46fc320778b8b4217c
**Link to Log**: **No Log available**
### ERROR
<pre>
2019-08-04 02:09:43 ERROR    SHOWQUEUE-REFRESH :: [74c3f12] 354216: Error while refreshing show Dimension 20. Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/show_queue.py#L692">medusa/show_queue.py</a>", line 692, in run
    self.show.populate_cache()
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/tv/series.py#L1779">medusa/tv/series.py</a>", line 1779, in populate_cache
    image_cache.fill_cache(self)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/image_cache.py#L339">medusa/image_cache.py</a>", line 339, in fill_cache
    _cache_image_from_indexer(series_obj, img_type)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/image_cache.py#L262">medusa/image_cache.py</a>", line 262, in _cache_image_from_indexer
    img_data = metadata_generator._retrieve_show_image(img_type_name, series_obj)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L773">medusa/metadata/generic.py</a>", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/metadata/generic.py#L898">medusa/metadata/generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/indexer_base.py#L399">medusa/indexers/indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L610">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 610, in _get_show_data
    self._parse_images(sid)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/fallback.py#L136">medusa/indexers/tvdbv2/fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/opt/Medusa/<a href="../blob/74c3f124fb599ad923e23f46fc320778b8b4217c/medusa/indexers/tvdbv2/tvdbv2_api.py#L490">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 490, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.4 (default, Jul 13 2019, 14:44:04) [GCC 8.3.0]`
**Operating System**: `Linux-4.19.56-Unraid-x86_64-with`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@baad1e5af59d7f29606c1fed1c110af1424bb117
**Link to Log**: https://gist.github.com/eacec771ee0db65566eb5f8dc8e47b4b
### ERROR
<pre>
2019-09-08 21:28:25 ERROR    SNATCHQUEUE-SNATCH-361456 :: [baad1e5] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''")
Traceback (most recent call last):
  File "/app/medusa/<a href="../blob/baad1e5af59d7f29606c1fed1c110af1424bb117/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

Manual search stopped working all attempt to snatch torrent from jacket result in this.
might be linked to qbittorrent current problem?
Error: Unable to get qbittorrent Authentication, check your config!
on a config that worked for months , tested transmission and works fine

### INFO
**Python Version**: `2.7.10 (default, Jan  6 2016, 14:39:32) [GCC 4.6.4]`
**Operating System**: `Linux-3.10.70-armv7l-with-glibc2.4`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@baad1e5af59d7f29606c1fed1c110af1424bb117
**Link to Log**: https://gist.github.com/a7976075534e3b7f39406507742cc0b9
### ERROR
<pre>
2019-10-04 21:11:03 ERROR    SNATCHQUEUE-SNATCH-341663 :: [baad1e5] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''",)
Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/sickbeard-tvrage/SickBeard-TVRage/<a href="../blob/baad1e5af59d7f29606c1fed1c110af1424bb117/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.10 (default, Jan  6 2016, 14:39:32) [GCC 4.6.4]`
**Operating System**: `Linux-3.10.70-armv7l-with-glibc2.4`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@baad1e5af59d7f29606c1fed1c110af1424bb117
**Link to Log**: https://gist.github.com/82bce87bbe10e7bb81227d9e1cdc7cc5
### ERROR
<pre>
2019-10-13 18:13:01 ERROR    SNATCHQUEUE-SNATCH-328724 :: [baad1e5] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''",)
Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/sickbeard-tvrage/SickBeard-TVRage/<a href="../blob/baad1e5af59d7f29606c1fed1c110af1424bb117/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]`
**Operating System**: `Linux-4.19.55-6-osmc-armv7l-with-debian-9.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@80b323eefca7c8d3c233ded9f389b0af35725f17
**Link to Log**: https://gist.github.com/d92e2679902d2081068b583a9f46cdda
### ERROR
<pre>
2019-11-13 21:15:39 ERROR    SHOWQUEUE-ADD :: [80b323e] Error searching dir for episodes: invalid literal for int() with base 10: 'graphical'
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 594, in run
    self.show.load_episodes_from_dir()
  File "/opt/**********/**********/tv/series.py", line 1079, in load_episodes_from_dir
    cur_episode = self.make_ep_from_file(os.path.join(self.location, media_file))
  File "/opt/**********/**********/tv/series.py", line 1445, in make_ep_from_file
    root_ep.create_meta_files()
  File "/opt/**********/**********/tv/episode.py", line 1133, in create_meta_files
    self.__create_nfo(metadata_provider)
  File "/opt/**********/**********/tv/episode.py", line 1147, in __create_nfo
    result = metadata_provider.create_episode_metadata(self) or result
  File "/opt/**********/**********/metadata/generic.py", line 283, in create_episode_metadata
    return self.write_ep_file(ep_obj)
  File "/opt/**********/**********/metadata/generic.py", line 492, in write_ep_file
    data = self._ep_data(ep_obj)
  File "/opt/**********/**********/metadata/kodi_12plus.py", line 220, in _ep_data
    series_obj = self._get_show_data(ep_obj.series)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 599, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 135, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 479, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: 'graphical'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]`
**Operating System**: `Linux-4.19.55-6-osmc-armv7l-with-debian-9.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@80b323eefca7c8d3c233ded9f389b0af35725f17
**Link to Log**: https://gist.github.com/2ae08b8791743154fe6fe0a33a473754
### ERROR
<pre>
2019-11-13 22:32:51 ERROR    SHOWQUEUE-ADD :: [80b323e] Error searching dir for episodes: invalid literal for int() with base 10: 'graphical'
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 594, in run
    self.show.load_episodes_from_dir()
  File "/opt/**********/**********/tv/series.py", line 1079, in load_episodes_from_dir
    cur_episode = self.make_ep_from_file(os.path.join(self.location, media_file))
  File "/opt/**********/**********/tv/series.py", line 1445, in make_ep_from_file
    root_ep.create_meta_files()
  File "/opt/**********/**********/tv/episode.py", line 1133, in create_meta_files
    self.__create_nfo(metadata_provider)
  File "/opt/**********/**********/tv/episode.py", line 1147, in __create_nfo
    result = metadata_provider.create_episode_metadata(self) or result
  File "/opt/**********/**********/metadata/generic.py", line 283, in create_episode_metadata
    return self.write_ep_file(ep_obj)
  File "/opt/**********/**********/metadata/generic.py", line 492, in write_ep_file
    data = self._ep_data(ep_obj)
  File "/opt/**********/**********/metadata/kodi_12plus.py", line 220, in _ep_data
    series_obj = self._get_show_data(ep_obj.series)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 599, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 135, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 479, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: 'graphical'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]`
**Operating System**: `Linux-4.19.55-6-osmc-armv7l-with-debian-9.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@80b323eefca7c8d3c233ded9f389b0af35725f17
**Link to Log**: https://gist.github.com/5fe1a379a424cc9fcba6ffce9cfd4ce2
### ERROR
<pre>
2019-11-14 00:40:24 ERROR    SHOWQUEUE-ADD :: [80b323e] Error searching dir for episodes: invalid literal for int() with base 10: 'graphical'
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 594, in run
    self.show.load_episodes_from_dir()
  File "/opt/**********/**********/tv/series.py", line 1079, in load_episodes_from_dir
    cur_episode = self.make_ep_from_file(os.path.join(self.location, media_file))
  File "/opt/**********/**********/tv/series.py", line 1445, in make_ep_from_file
    root_ep.create_meta_files()
  File "/opt/**********/**********/tv/episode.py", line 1133, in create_meta_files
    self.__create_nfo(metadata_provider)
  File "/opt/**********/**********/tv/episode.py", line 1147, in __create_nfo
    result = metadata_provider.create_episode_metadata(self) or result
  File "/opt/**********/**********/metadata/generic.py", line 283, in create_episode_metadata
    return self.write_ep_file(ep_obj)
  File "/opt/**********/**********/metadata/generic.py", line 492, in write_ep_file
    data = self._ep_data(ep_obj)
  File "/opt/**********/**********/metadata/kodi_12plus.py", line 220, in _ep_data
    series_obj = self._get_show_data(ep_obj.series)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 599, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 135, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 479, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: 'graphical'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]`
**Operating System**: `Linux-4.19.55-6-osmc-armv7l-with-debian-9.11`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@80b323eefca7c8d3c233ded9f389b0af35725f17
**Link to Log**: https://gist.github.com/b783029d49f3e19d231e1c570b856fb4
### ERROR
<pre>
2019-11-14 01:46:33 ERROR    SHOWQUEUE-ADD :: [80b323e] Error searching dir for episodes: invalid literal for int() with base 10: 'graphical'
Traceback (most recent call last):
  File "/opt/**********/**********/show_queue.py", line 594, in run
    self.show.load_episodes_from_dir()
  File "/opt/**********/**********/tv/series.py", line 1079, in load_episodes_from_dir
    cur_episode = self.make_ep_from_file(os.path.join(self.location, media_file))
  File "/opt/**********/**********/tv/series.py", line 1445, in make_ep_from_file
    root_ep.create_meta_files()
  File "/opt/**********/**********/tv/episode.py", line 1134, in create_meta_files
    self.__create_thumbnail(metadata_provider)
  File "/opt/**********/**********/tv/episode.py", line 1157, in __create_thumbnail
    result = metadata_provider.create_episode_thumb(self) or result
  File "/opt/**********/**********/metadata/generic.py", line 366, in create_episode_thumb
    return self.save_thumbnail(ep_obj)
  File "/opt/**********/**********/metadata/generic.py", line 536, in save_thumbnail
    thumb_data = self._retrieve_show_image(u'thumbnail', ep_obj.series, ep_obj)
  File "/opt/**********/**********/metadata/generic.py", line 773, in _retrieve_show_image
    indexer_show_obj = self._get_show_data(show_obj)
  File "/opt/**********/**********/metadata/generic.py", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/opt/**********/**********/indexers/indexer_base.py", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 599, in _get_show_data
    self._parse_images(sid)
  File "/opt/**********/**********/indexers/tvdbv2/fallback.py", line 135, in __call__
    return self.func(*args, **kwargs)
  File "/opt/**********/**********/indexers/tvdbv2/tvdbv2_api.py", line 479, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: 'graphical'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.5 (default, Oct 19 2019, 00:50:49) [GCC 8.3.0]`
**Operating System**: `Linux-3.10.105-x86_64-with`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@80b323eefca7c8d3c233ded9f389b0af35725f17
**Link to Log**: **No Log available**
### ERROR
<pre>
2019-11-16 05:06:22 ERROR    SHOWQUEUE-REFRESH :: [80b323e] 253463: Error while refreshing show Black Mirror. Error: invalid literal for int() with base 10: 'graphical'
Traceback (most recent call last):
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/show_queue.py#L679">medusa/show_queue.py</a>", line 679, in run
    self.show.write_metadata()
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/tv/series.py#L999">medusa/tv/series.py</a>", line 999, in write_metadata
    self.__get_images(metadata_provider)
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/tv/series.py#L1356">medusa/tv/series.py</a>", line 1356, in __get_images
    season_posters_result = metadata_provider.create_season_posters(self) or season_posters_result
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/metadata/generic.py#L378">medusa/metadata/generic.py</a>", line 378, in create_season_posters
    result.append(self.save_season_posters(show_obj, season))
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/metadata/generic.py#L614">medusa/metadata/generic.py</a>", line 614, in save_season_posters
    season_dict = self._season_posters_dict(show_obj, season)
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/metadata/generic.py#L818">medusa/metadata/generic.py</a>", line 818, in _season_posters_dict
    indexer_show_obj = self._get_show_data(show_obj)
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/metadata/generic.py#L898">medusa/metadata/generic.py</a>", line 898, in _get_show_data
    my_show = self.indexer_api[int(series_id)]
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/indexers/indexer_base.py#L399">medusa/indexers/indexer_base.py</a>", line 399, in __getitem__
    self._get_show_data(key, self.config['language'])
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/indexers/tvdbv2/tvdbv2_api.py#L599">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 599, in _get_show_data
    self._parse_images(sid)
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/indexers/tvdbv2/fallback.py#L135">medusa/indexers/tvdbv2/fallback.py</a>", line 135, in __call__
    return self.func(*args, **kwargs)
  File "/app/medusa/<a href="../blob/80b323eefca7c8d3c233ded9f389b0af35725f17/medusa/indexers/tvdbv2/tvdbv2_api.py#L479">medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 479, in _parse_images
    if int(image.sub_key) not in _images[image_type][resolution]:
ValueError: invalid literal for int() with base 10: 'graphical'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `3.7.5 (default, Nov  1 2019, 02:16:23) [Clang 11.0.0 (clang-1100.0.33.8)]`
**Operating System**: `Darwin-19.0.0-x86_64-i386-64bit`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@fcb5a1969dcd4ea0b6fb4a9debbf60179b0bbf4b
**Link to Log**: https://gist.github.com/571cf76cc3b62a8909cede1a95b3d97c
### ERROR
<pre>
2019-12-05 15:59:16 ERROR    SNATCHQUEUE-SNATCH-328634 :: [fcb5a19] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''")
Traceback (most recent call last):
  File "/Users/ovidijus/Apps/Medusa/<a href="../blob/fcb5a1969dcd4ea0b6fb4a9debbf60179b0bbf4b/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

this just happened on master, seems qbittorrent 4.2.0 has bumped up the API version again..

### INFO
**Python Version**: `3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]`
**Operating System**: `Linux-5.3.0-24-generic-x86_64-with-LinuxMint-19.2-tina`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@fcb5a1969dcd4ea0b6fb4a9debbf60179b0bbf4b
**Link to Log**: **No Log available**
### ERROR
<pre>
2019-12-05 00:00:34 ERROR    SNATCHQUEUE-SNATCH-337178 :: [fcb5a19] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''",)
Traceback (most recent call last):
  File "/opt/medusa/<a href="../blob/fcb5a1969dcd4ea0b6fb4a9debbf60179b0bbf4b/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

So you guys are now running qbittorrent 4.2.0?
Could it be that you where using this option "Bypass authentication for local access". And that the update has switched it off?

Or maybe you need to reset the pass? Also read things about that.
Just updated to qBittorrent v4.2.0.
My WebUI password (used for the API as well) was suddenly invalid.

*Edit*: From the changelog - `WEBUI: Use PBKDF2 for the WebUI password. You will need to set your password again. (Chocobo1)`

Needed to enter it again in the qBittorrent application settings and save them for it to let me log in to the WebUI.
Please note that the login failure from Medusa's connection test is not displayed on Medusa logs, but the qBittorrent application logs said that the password was incorrect (might also be true for logging in before adding a torrent).

I still don't know if that's the whole issue here, I will keep you updated.
**As a side note, after updating qBittorrent I also restarted Medusa.**

---

> Could it be that you where using this option "Bypass authentication for local access". And that the update has switched it off?

BTW, I never had this option on.

---

Also FYI, the response to `http://qbittorrent:port/api/v2/app/webapiVersion` is: `2.3`

---

Update: Works for me.
![image](https://user-images.githubusercontent.com/10238474/70266023-5799e400-17a4-11ea-8977-44a5e0098600.png)


### INFO
**Python Version**: `2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.18362`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@8b7f433d4dce89058a8b9b62cc9bcd7a162a3344
**Link to Log**: https://gist.github.com/0c958c21f8bf9cff12cbc5ae60943a14
### ERROR
<pre>
2019-12-11 14:20:14 ERROR    SNATCHQUEUE-SNATCH-351269 :: [8b7f433] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''",)
Traceback (most recent call last):
  File "D:\Plex\Medusa\<a href="../blob/8b7f433d4dce89058a8b9b62cc9bcd7a162a3344/medusa/clients/torrent/qbittorrent.py#L47">medusa\clients\torrent\qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


### INFO
**Python Version**: `2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.18362`
**Locale**: `cp1250`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@8b7f433d4dce89058a8b9b62cc9bcd7a162a3344
**Link to Log**: https://gist.github.com/bfa78df0bfc061f78d9cf311848502cf
### ERROR
<pre>
2019-12-11 14:27:38 ERROR    SNATCHQUEUE-SNATCH-331600 :: [8b7f433] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''",)
Traceback (most recent call last):
  File "C:\Miki\Medusa\<a href="../blob/8b7f433d4dce89058a8b9b62cc9bcd7a162a3344/medusa/clients/torrent/qbittorrent.py#L47">medusa\clients\torrent\qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

Reentered password in qBt WebUI settings.
Checked that bypass authentication was off.

### INFO
**Python Version**: `3.7.0 (default, Aug 23 2018, 17:59:06) [GCC 4.6.4]`
**Operating System**: `Linux-3.10.70-armv7l-with-glibc2.9`
**Locale**: `None`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@8b7f433d4dce89058a8b9b62cc9bcd7a162a3344
**Link to Log**: https://gist.github.com/aa00f7a269b287a746266866b619b085
### ERROR
<pre>
2019-12-11 21:30:48 ERROR    SNATCHQUEUE-SNATCH-311876 :: [8b7f433] qbittorrent: Unable to get API version. Error: ValueError("invalid literal for int() with base 10: ''")
Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/sickbeard-tvrage/SickBeard-TVRage/<a href="../blob/8b7f433d4dce89058a8b9b62cc9bcd7a162a3344/medusa/clients/torrent/qbittorrent.py#L47">medusa/clients/torrent/qbittorrent.py</a>", line 47, in api
    version = list(map(int, version.text.split('.')))
ValueError: invalid literal for int() with base 10: ''
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

@pax0707 Have you restarted Medusa after that?
@jockium Try https://github.com/pymedusa/Medusa/issues/3134#issuecomment-562262927
@sharkykh medusa and qbt. That worked for you?
Yeah, it did.
Sorry, I just realized something in your log:
`POST URL: https://******/api/v2/auth/login [Status: 403]`
You need to restart qBittorrent one more time. Status code 403 on the new API means:
`Your IP address has been banned after too many failed authentication attempts.`
You need to restart qBT to unban it.

I'll see if I can fix Medusa's qBittorrent client code to give better warning messages when username/password are incorrect and when your IP is banned by qBT.

Resolving patch:
diff --git a/medusa/clients/torrent/qbittorrent.py b/medusa/clients/torrent/qbittorrent.py
--- a/medusa/clients/torrent/qbittorrent.py
+++ b/medusa/clients/torrent/qbittorrent.py
@@ -11,11 +11,16 @@
 from medusa.logger.adapters.style import BraceAdapter
 
 from requests.auth import HTTPDigestAuth
+from requests.compat import urljoin
 
 log = BraceAdapter(logging.getLogger(__name__))
 log.logger.addHandler(logging.NullHandler())
 
 
+class APIUnavailableError(Exception):
+    """Raised when the API version is not available."""
+
+
 class QBittorrentAPI(GenericClient):
     """qBittorrent API class."""
 
@@ -29,47 +34,54 @@ def __init__(self, host=None, username=None, password=None):
         :param password:
         :type password: string
         """
-        super(QBittorrentAPI, self).__init__('qbittorrent', host, username, password)
+        super(QBittorrentAPI, self).__init__('qBittorrent', host, username, password)
         self.url = self.host
+        # Auth for API v1.0.0 (qBittorrent v3.1.x and older)
         self.session.auth = HTTPDigestAuth(self.username, self.password)
 
-    @property
-    def api(self):
-        """Get API version."""
-        # Update the auth method to v2
-        self._get_auth = self._get_auth_v2
-        # Attempt to get API v2 version first
-        self.url = '{host}api/v2/app/webapiVersion'.format(host=self.host)
-        try:
-            version = self.session.get(self.url, verify=app.TORRENT_VERIFY_CERT,
-                                       cookies=self.session.cookies)
-            # Make sure version is using the (major, minor, release) format
-            version = list(map(int, version.text.split('.')))
-            if len(version) < 2:
-                version.append(0)
-            return tuple(version)
-        except (AttributeError, ValueError) as error:
-            log.error('{name}: Unable to get API version. Error: {error!r}',
-                      {'name': self.name, 'error': error})
-
-        # Fall back to API v1
-        self._get_auth = self._get_auth_legacy
-        try:
-            self.url = '{host}version/api'.format(host=self.host)
-            version = int(self.session.get(self.url, verify=app.TORRENT_VERIFY_CERT).content)
-            # Convert old API versioning to new versioning (major, minor, release)
-            version = (1, version % 100, 0)
-        except Exception:
-            version = (1, 0, 0)
-        return version
+        self.api = None
 
     def _get_auth(self):
-        """Select between api v2 and legacy."""
-        return self._get_auth_v2() or self._get_auth_legacy()
+        """Authenticate with the client using the most recent API version available for use."""
+        try:
+            auth = self._get_auth_v2()
+            version = 2
+        except APIUnavailableError:
+            auth = self._get_auth_legacy()
+            version = 1
+
+        # Authentication failed /or/ We already have the API version
+        if not auth or self.api:
+            return auth
+
+        # Get API version
+        if version == 2:
+            self.url = urljoin(self.host, 'api/v2/app/webapiVersion')
+            try:
+                response = self.session.get(self.url, verify=app.TORRENT_VERIFY_CERT)
+                if not response.text:
+                    raise ValueError('Response from client is empty. [Status: {0}]'.format(response.status_code))
+                # Make sure version is using the (major, minor, release) format
+                version = tuple(map(int, response.text.split('.')))
+                # Fill up with zeros to get the correct format. e.g: (2, 3) => (2, 3, 0)
+                self.api = version + (0,) * (3 - len(version))
+            except (AttributeError, ValueError) as error:
+                log.error('{name}: Unable to get API version. Error: {error!r}',
+                          {'name': self.name, 'error': error})
+        elif version == 1:
+            try:
+                self.url = urljoin(self.host, 'version/api')
+                version = int(self.session.get(self.url, verify=app.TORRENT_VERIFY_CERT).text)
+                # Convert old API versioning to new versioning (major, minor, release)
+                self.api = (1, version % 100, 0)
+            except Exception:
+                self.api = (1, 0, 0)
+
+        return auth
 
     def _get_auth_v2(self):
-        """Authenticate using the new method (API v2)."""
-        self.url = '{host}api/v2/auth/login'.format(host=self.host)
+        """Authenticate using API v2."""
+        self.url = urljoin(self.host, 'api/v2/auth/login')
         data = {
             'username': self.username,
             'password': self.password,
@@ -79,17 +91,31 @@ def _get_auth_v2(self):
         except Exception:
             return None
 
-        if self.response.status_code == 404:
-            return None
+        if self.response.status_code == 200:
+            if self.response.text == 'Fails.':
+                log.warning('{name}: Invalid Username or Password, check your config',
+                            {'name': self.name})
+                return None
 
-        self.session.cookies = self.response.cookies
-        self.auth = self.response.content
+            # Successful log in
+            self.session.cookies = self.response.cookies
+            self.auth = self.response.text
 
-        return self.auth
+            return self.auth
+
+        if self.response.status_code == 404:
+            # API v2 is not available
+            raise APIUnavailableError()
+
+        if self.response.status_code == 403:
+            log.warning('{name}: Your IP address has been banned after too many failed authentication attempts.'
+                        ' Restart {name} to unban.',
+                        {'name': self.name})
+            return None
 
     def _get_auth_legacy(self):
-        """Authenticate using the legacy method (API v1)."""
-        self.url = '{host}login'.format(host=self.host)
+        """Authenticate using legacy API."""
+        self.url = urljoin(self.host, 'login')
         data = {
             'username': self.username,
             'password': self.password,
@@ -99,7 +125,7 @@ def _get_auth_legacy(self):
         except Exception:
             return None
 
-        # Pre-API v1
+        # API v1.0.0 (qBittorrent v3.1.x and older)
         if self.response.status_code == 404:
             try:
                 self.response = self.session.get(self.host, verify=app.TORRENT_VERIFY_CERT)
@@ -107,14 +133,14 @@ def _get_auth_legacy(self):
                 return None
 
         self.session.cookies = self.response.cookies
-        self.auth = self.response.content
+        self.auth = (self.response.status_code != 404) or None
 
-        return self.auth if not self.response.status_code == 404 else None
+        return self.auth
 
     def _add_torrent_uri(self, result):
 
         command = 'api/v2/torrents/add' if self.api >= (2, 0, 0) else 'command/download'
-        self.url = '{host}{command}'.format(host=self.host, command=command)
+        self.url = urljoin(self.host, command)
         data = {
             'urls': result.url,
         }
@@ -123,7 +149,7 @@ def _add_torrent_uri(self, result):
     def _add_torrent_file(self, result):
 
         command = 'api/v2/torrents/add' if self.api >= (2, 0, 0) else 'command/upload'
-        self.url = '{host}{command}'.format(host=self.host, command=command)
+        self.url = urljoin(self.host, command)
         files = {
             'torrents': (
                 '{result}.torrent'.format(result=result.name),
@@ -140,27 +166,30 @@ def _set_torrent_label(self, result):
 
         api = self.api
         if api >= (2, 0, 0):
-            self.url = '{host}api/v2/torrents/setCategory'.format(host=self.host)
+            self.url = urljoin(self.host, 'api/v2/torrents/setCategory')
             label_key = 'category'
         elif api > (1, 6, 0):
             label_key = 'Category' if api >= (1, 10, 0) else 'Label'
-            self.url = '{host}command/set{key}'.format(
-                host=self.host,
-                key=label_key,
-            )
+            self.url = urljoin(self.host, 'command/set' + label_key)
 
         data = {
             'hashes': result.hash.lower(),
             label_key.lower(): label.replace(' ', '_'),
         }
-        return self._request(method='post', data=data, cookies=self.session.cookies)
+        ok = self._request(method='post', data=data, cookies=self.session.cookies)
+
+        if self.response.status_code == 409:
+            log.warning('{name}: Unable to set torrent label. You need to create the label '
+                        ' in {name} first.', {'name': self.name})
+            ok = False
+
+        return ok
 
     def _set_torrent_priority(self, result):
 
         command = 'api/v2/torrents' if self.api >= (2, 0, 0) else 'command'
         method = 'increase' if result.priority == 1 else 'decrease'
-        self.url = '{host}{command}/{method}Prio'.format(
-            host=self.host, command=command, method=method)
+        self.url = urljoin(self.host, '{command}/{method}Prio'.format(command=command, method=method))
         data = {
             'hashes': result.hash.lower(),
         }
@@ -178,7 +207,7 @@ def _set_torrent_pause(self, result):
         state = 'pause' if app.TORRENT_PAUSED else 'resume'
         command = 'api/v2/torrents' if api >= (2, 0, 0) else 'command'
         hashes_key = 'hashes' if self.api >= (1, 18, 0) else 'hash'
-        self.url = '{host}{command}/{state}'.format(host=self.host, command=command, state=state)
+        self.url = urljoin(self.host, '{command}/{state}'.format(command=command, state=state))
         data = {
             hashes_key: result.hash.lower(),
         }
@@ -196,10 +225,10 @@ def remove_torrent(self, info_hash):
             'hashes': info_hash.lower(),
         }
         if self.api >= (2, 0, 0):
-            self.url = '{host}api/v2/torrents/delete'.format(host=self.host)
+            self.url = urljoin(self.host, 'api/v2/torrents/delete')
             data['deleteFiles'] = True
         else:
-            self.url = '{host}command/deletePerm'.format(host=self.host)
+            self.url = urljoin(self.host, 'command/deletePerm')
 
         return self._request(method='post', data=data, cookies=self.session.cookies)
 


Test patch: