Skip to content

BUG: Unhandled error in plugin metainfo_content_size: 'NoneType' object has no attribute 'endswith' #1403

Description

@maartenpaauw

Expected behaviour:

Accept completed torrents.

Actual behaviour:

Crashing.

Steps to reproduce:

  • Step 1: Updated Flexget.
  • Step 2: Updated Python.
  • Step 3: After removing "onlycomplete" from "from_transmission" it works. My config worked before.

Config:

# Laad series vanaf transmission.
      - from_transmission:

          # Gebruikersnaam van Transmission.
          username: '{{ secrets.transmission.username }}'

          # Wachtwoord van Transmission.
          password: '{{ secrets.transmission.password }}'

          # Alle torrents worden opgepakt.
          onlycomplete: yes

Log:

2016-09-11 22:28 DEBUG    manager                       Figuring out config load paths
2016-09-11 22:28 DEBUG    manager                       Found config: /Users/<<USERNAME>>/.flexget/config.yml
2016-09-11 22:28 DEBUG    manager                       Config file /Users/<<USERNAME>>/.flexget/config.yml selected
2016-09-11 22:28 VERBOSE  task_queue                    There are 5 tasks to execute. Shutdown will commence when they have completed.
2016-09-11 22:28 VERBOSE  trakt_list    series_task     Retrieving `shows` list `series`
2016-09-11 22:28 VERBOSE  filesystem    series_task     Starting to scan folders.
2016-09-11 22:28 VERBOSE  filesystem    series_task     Scanning folder /Users/<<USERNAME>>/Downloads/Transmission/Torrents/Series/. Recursion is set to False.
2016-09-11 22:28 WARNING  inputs        series_task     Input filesystem did not return anything
2016-09-11 22:28 VERBOSE  backlog       series_task     Added 3 entries from backlog
2016-09-11 22:28 VERBOSE  details       series_task     Produced 91 entries.
2016-09-11 22:28 CRITICAL task          series_task     BUG: Unhandled error in plugin metainfo_content_size: 'NoneType' object has no attribute 'endswith'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flexget/task.py", line 476, in __run_plugin
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/flexget/plugins/metainfo/content_size.py", line 56, in on_task_metainfo
    if entry['location'].endswith('.torrent') or entry['location'].endswith('.nzb'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Additional information:

  • Flexget Version: 2.3.23
  • Python Version: 2.7.12
  • Installation method: pip
  • OS and version: OS X El Capitan 10.11.6

Activity

  1. tarzasai commented on Sep 23, 2016

    @tarzasai
    Contributor

    It's happening to me all the times and it's weird, because the "location in entry" check on line 54 should avoid this thing. Anyway I'll try to refine that "if" and see what happens for a while... should send a PR in a few days.

  2. gazpachoking commented on Sep 24, 2016

    @gazpachoking
    Member

    I suspect this was populating the 'location' field with None. The location field is meant to point to the file on disk, I added a conditional for now to make sure it doesn't populate with None, but the behavior there should probably be scrutinized further by someone with transmission installed. @Flexget/transmission

  3. tarzasai commented on Sep 24, 2016

    @tarzasai
    Contributor

    thanks, then I'll find out if from_transmission is doing that.

  4. grrr2 commented on Sep 24, 2016

    @grrr2
    Contributor

    (bigfella in the source is referring to the largest file, a.k.a the main file without *.nfo for example. so if that main files is downloaded basically we are done - that's my understanding don't beat me if not :-) )

  5. gazpachoking commented on Sep 24, 2016

    @gazpachoking
    Member

    I think from_transmission should update its behavior to have the location field be the location of the torrent file itself. If it also provides the location of the main content field in some other field that is fine.

  6. tarzasai commented on Sep 25, 2016

    @tarzasai
    Contributor

    well, people using the main_file_only options expect location to point to a single file, i.e. to copy the file elsewhere (like I do). I don't want to break all their config.

  7. cvium commented on Sep 25, 2016

    @cvium
    Contributor

    That's what the next branch is for. I'd say that location field should be the location of the torrent contents ie. a folder or a single file. Then have a separate field for the main file or whatever.

    Don't think it makes much sense to have the location be the torrent file itself since it could be a magnet.

  8. tarzasai commented on Sep 26, 2016

    @tarzasai
    Contributor

    just to confirm @gazpachoking was right:

    2016-09-26 06:01 INFO     transmission  move_series     PluginTransmissionInput.on_task_input: bigfella is None!
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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