Skip to content

Unhandled error in plugin transmission: list indices must be integers or slices, not File #2798

@X-dark

Description

@X-dark

Expected behaviour:

Transmission plugin is unusable since #2791. Once worked around #2794 I still hit the following error. As noted in the forum, this seems to be related to skip_files settings. I am reverting ff560af for now to have a usable flexget.

Actual behaviour:

Config:

  transmissionrpc:
    transmission:
      host: 1.2.3.4
      port: 9091
      username: '{? transmission.login ?}'
      password: '{? transmission.password ?}'
      ratio: 0
      add_paused: no
      magnetization_timeout: 60
      path: /data/buffer/completed/flexget
      skip_files:
        - '*.nfo'
        - '*.sfv'
        - '*[sS]ample*'
        - '*.txt'
      main_file_only: yes

Log:

list indices must be integers or slices, not File error (click to expand)
2021-01-02 07:13:12 CRITICAL task          watch-rss       BUG: Unhandled error in plugin transmission: list indices must be integers or slices, not File
Traceback (most recent call last):

  File "/usr/local/lib/python3.9/threading.py", line 912, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f8e89e2b9d0>
    └ <Thread(task_queue, started daemon 140250081102624)>
  File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f8e89e2b700>
    └ <Thread(task_queue, started daemon 140250081102624)>
  File "/usr/local/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(task_queue, started daemon 140250081102624)>
    │    │        │    └ ()
    │    │        └ <Thread(task_queue, started daemon 140250081102624)>
    │    └ <bound method TaskQueue.run of <flexget.task_queue.TaskQueue object at 0x7f8e85649e80>>
    └ <Thread(task_queue, started daemon 140250081102624)>
  File "/usr/local/lib/python3.9/site-packages/flexget/task_queue.py", line 46, in run
    self.current_task.execute()
    │    │            └ <function Task.execute at 0x7f8e882b1940>
    │    └ <flexget.task.Task object at 0x7f8e83c5f0a0>
    └ <flexget.task_queue.TaskQueue object at 0x7f8e85649e80>
  File "/usr/local/lib/python3.9/site-packages/flexget/task.py", line 87, in wrapper
    return func(self, *args, **kw)
           │    │      │       └ {}
           │    │      └ ()
           │    └ <flexget.task.Task object at 0x7f8e83c5f0a0>
           └ <function Task.execute at 0x7f8e882b18b0>
  File "/usr/local/lib/python3.9/site-packages/flexget/task.py", line 722, in execute
    self._execute()
    │    └ <function Task._execute at 0x7f8e882b1820>
    └ <flexget.task.Task object at 0x7f8e83c5f0a0>
  File "/usr/local/lib/python3.9/site-packages/flexget/task.py", line 688, in _execute
    self.__run_task_phase(phase)
    │                     └ 'output'
    └ <flexget.task.Task object at 0x7f8e83c5f0a0>
  File "/usr/local/lib/python3.9/site-packages/flexget/task.py", line 514, in __run_task_phase
    response = self.__run_plugin(plugin, phase, args)
               │                 │       │      └ (<flexget.task.Task object at 0x7f8e83c5f0a0>, {'host': '1.2.3.4', 'port': 9091, 'username': 'user', 'password':...
               │                 │       └ 'output'
               │                 └ <PluginInfo(name=transmission)>
               └ <flexget.task.Task object at 0x7f8e83c5f0a0>
> File "/usr/local/lib/python3.9/site-packages/flexget/task.py", line 547, in __run_plugin
    result = method(*args, **kwargs)
             │       │       └ {}
             │       └ (<flexget.task.Task object at 0x7f8e83c5f0a0>, {'host': '1.2.3.4', 'port': 9091, 'username': 'user', 'password':...
             └ <Event(name=plugin.transmission.output,func=on_task_output,priority=135)>
  File "/usr/local/lib/python3.9/site-packages/flexget/event.py", line 20, in __call__
    return self.func(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ (<flexget.task.Task object at 0x7f8e83c5f0a0>, {'host': '1.2.3.4', 'port': 9091, 'username': 'transmission', 'password':...
           │    └ <bound method PluginTransmission.on_task_output of <flexget.plugins.clients.transmission.PluginTransmission object at 0x7f8e8...
           └ <Event(name=plugin.transmission.output,func=on_task_output,priority=135)>
  File "/usr/local/lib/python3.9/site-packages/flexget/plugins/clients/transmission.py", line 486, in on_task_output
    if find_main_file and file_list[f]['size'] > total_size * main_ratio:
       │                  │         │            │            └ 0.9
       │                  │         │            └ 2337927969
       │                  │         └ File(name='Show.S05E05.720p.WEB.DDP5.1.x264.mkv', size=2337927969, completed=0, priority='normal', s...
       │                  └ [File(name='Show.S05E05.720p.WEB.DDP5.1.x264.mkv', size=2337927969, completed=0, priority='normal', ...
       └ True

TypeError: list indices must be integers or slices, not File

Additional information:

  • FlexGet version: latest git
  • Python version: 3.9
  • Installation method: Container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions