Repository: Flexget/Flexget

Issue:
Unhandled Exception in metainfo_series
#### Expected behaviour:
metainfo_series with no issues

### Actual behaviour:
metainfo_series crashes with info message:
```
2019-10-14 21:02 CRITICAL task          sort-series     BUG: Unhandled error in plugin metainfo_series: 'NoneType' object has no attribute 'endswith'
2019-10-14 21:02 CRITICAL manager       sort-series     An unexpected crash has occurred. Writing crash report to /home/flexget/crash_report.2019.10.14.210243360992.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.21.25
2019-10-14 21:02 WARNING  task          sort-series     Aborting task (plugin: metainfo_series)
```

#### Config:
```yaml
--- config from task: sort-series
accept_all: true
disable:
  - seen
  - seen_info_hash
  - rejected
filesystem:
  path: /mnt/D4B811C9B811AB4E/torrents/completed
  recursive: true
  regexp: .*\.(avi|mkv|mp4|m4v|)$
list_match:
  action: accept
  from:
    - entry_list: series_list
  remove_on_match: true
  single_match: true
metainfo_series: true
move:
  along:
    extensions:
      - sub
      - srt
    subdirs:
      - Subs
  rename: '{{ tvdb_series_name }} - {{ tvdb_ep_id|d(series_id, True) }} - {{ tvdb_ep_name|d(series_name,
    True) }}'
  to: /mnt/Sack/Elements/Series/{{ tvdb_series_name }}/Season {{tvdb_season|pad(2)}}
parsing:
  series: guessit
priority: 3
regexp:
  reject:
    - sample
require_field:
  - tvdb_series_name
  - tvdb_ep_id
  - tvdb_ep_name
thetvdb_lookup: true
```
  
#### Log:
<details>
 <summary>(click to expand)</summary>

```
2019-10-14 20:17 CRITICAL task          sort-series     BUG: Unhandled error in plugin metainfo_series: unsupported operand type(s) for +=: 'NoneType' and 'unicode'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 486, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/series.py", line 32, in on_task_metainfo
    self.guess_entry(entry)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/metainfo/series.py", line 47, in guess_entry
    allow_seasonless=allow_seasonless)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/parsers/plugin_parsing.py", line 74, in parse_series
    return parser.parse_series(data, name=name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/parsers/parser_guessit.py", line 185, in parse_series
    name += ' (%s)' % country.alpha2
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'unicode'

```
</details>

### Additional information:

- FlexGet version: 2.21.25
- Python version: 2.7
- Installation method: pip
- Using daemon (yes/no): yes
- OS and version: dietpi 



Discussion:

Resolving patch:
diff --git a/flexget/plugins/plugin_transmission.py b/flexget/plugins/plugin_transmission.py
--- a/flexget/plugins/plugin_transmission.py
+++ b/flexget/plugins/plugin_transmission.py
@@ -112,9 +112,9 @@ def on_task_start(self, task, config):
             from transmissionrpc import TransmissionError
             from transmissionrpc import HTTPHandlerError
         except:
-            raise plugin.PluginError('Transmissionrpc module version 0.6 or higher required.', log)
-        if [int(part) for part in transmissionrpc.__version__.split('.')] < [0, 6]:
-            raise plugin.PluginError('Transmissionrpc module version 0.6 or higher required, please upgrade', log)
+            raise plugin.PluginError('Transmissionrpc module version 0.11 or higher required.', log)
+        if [int(part) for part in transmissionrpc.__version__.split('.')] < [0, 11]:
+            raise plugin.PluginError('Transmissionrpc module version 0.11 or higher required, please upgrade', log)
         config = self.prepare_config(config)
         if config['enabled']:
             if task.options.test:


Test patch: