Skip to content

BUG: Unhandled error in plugin discover: Multiple rows were found for one_or_none() #1433

@opicron

Description

@opicron

Expected behaviour:

download through discover plugin

Actual behaviour:

bug error in discover plugin

Steps to reproduce:

  • Step 1: run task get-shows

Config:

 templates:

      # 
      # Show template
      # 
      tv:
        configure_series:
          settings:
            # Configure all the series options to your taste
            identified_by: ep
            #tracking: backfill
            #upgrade: yes #download higher quality once available
            timeframe: 4 hours
            target: hdtv-bluray <=720p
            quality: <=720p hdtv|webdl|webrip
            #path: d:\_flexget\_torrentTest\
            path: d:\_Transmission\_Autoleech\
            # {{series_name}}/Season {{series_season}}/  # This will sort your downloads if you are using one of the output plugins which supports it
          from: 
            #entry_list: trakt shows
            trakt_list:
              username: '{{ secrets.trakt.usr }}' 
              account: '{{ secrets.trakt.usr }}'
              list: following
              type: shows

    #
    # Tasks
    #
    #

    tasks:


      # This task will look for episodes you have added to your `My TV Shows` list at trakt.
      # 
      # 
      sync-trakt:
        priority: 7 
        #seen: global
        next_trakt_episodes:
          username: '{{ secrets.trakt.usr }}' 
          account: '{{ secrets.trakt.usr }}'
          context: watched
          list: Following  
          position: next    
        accept_all: yes
        #disable: seen    
        set_series_begin: yes
        #list_add:
        #  - entry_list: trakt shows

      # this will start an series from episode in Following
      # It will set the `begin` series option for that show, then remove the episode and re-add it to your `My TV Shows` list as a show.
      # 
      # 
      sync-episode:
        priority: 6
        #seen: local #disable seen so all episodes from following list are accepted
        disable: seen
        accept_all: yes
        trakt_list:
          username: '{{ secrets.trakt.usr }}' 
          account: '{{ secrets.trakt.usr }}'
          list: Following
          type: episodes #finally! working   
        set_series_begin: yes  # set beginning episode
        list_remove: #remove episode from following
          - trakt_list:
              username: '{{ secrets.trakt.usr }}' 
              account: '{{ secrets.trakt.usr }}'
              list: Following
              #type: episodes # not required!
        list_add:
          - trakt_list:
              username: '{{ secrets.trakt.usr }}' 
              account: '{{ secrets.trakt.usr }}'
              list: Following
              type: shows

      # This task is what will actually download your shows.
      # See http://flexget.com/wiki/Cookbook/Series/Search for a more detailed explanation of how this search based task works, as well as an example of how to use your `tv` template on an rss based task alongside.
      get-shows:
        #retry_failed:
        #  retry_time: 1 seconds
        #  retry_time_multiplier: 1
        #  max_retries: 100
        priority: 10
        # If this is your only task getting shows, you can just include the configure_series plugin here instead of using the template.
        template: tv
        discover:
          what:
            - next_series_episodes: yes
            #- next_series_episodes: 
            #    backfill: yes
            #    from_start: yes
          from:
            # Pick a search plugin(s) http://flexget.com/wiki/Searches
            - torrentleech: 
                rss_key: '{{ secrets.torrentleech.rss }}'
                username: '{{ secrets.torrentleech.usr }}'
                password: '{{ secrets.torrentleech.pass }}'
                category: [26]
        # Also add an appropriate output plugin here (perhaps `transmission` or `deluge` if you are using those clients.) http://flexget.com/wiki/Plugins#Output
        regexp:
          reject:
            - spanish
        pushover:
          userkey: []
          apikey: []
          title: "FlexGet"
          message: "{{ series_name }} S{{  '%02d'|format(series_season) }}E{{ '%02d'|format(series_episode) }} ({{ quality|upper }})"
        download: yes
        #list_remove:
        #  - trakt_list:
        #      username: '{{ secrets.trakt.usr }}' 
        #      account: '{{ secrets.trakt.usr }}'
        #      list: Following
        #      type: episodes

Log:

 2016-10-04 18:16 VERBOSE  input_cache   get-shows       Restored 26 entries from db cache
    2016-10-04 18:16 VERBOSE  discover      get-shows       Discovering 24 titles ...
    2016-10-04 18:16 INFO     discover      get-shows       Ignoring interval because of --discover-now
    2016-10-04 18:16 INFO     task          get-shows       Plugin next_series_episodes has requested task to be ran again after execution has completed. Reason: Look for next season
    2016-10-04 18:16 CRITICAL task          get-shows       BUG: Unhandled error in plugin discover: Multiple rows were found for one_or_none()
    Traceback (most recent call last):
      File "d:\code\python\lib\site-packages\flexget\task.py", line 477, in __run_plugin
        return method(*args, **kwargs)
      File "d:\code\python\lib\site-packages\flexget\event.py", line 23, in __call__
        return self.func(*args, **kwargs)
      File "d:\code\python\lib\site-packages\flexget\plugins\input\discover.py", line 289, in on_task_input
        entries = self.estimated(entries, estimation_mode)
      File "d:\code\python\lib\site-packages\flexget\plugins\input\discover.py", line 201, in estimated
        est_date = estimator.estimate(entry)
      File "d:\code\python\lib\site-packages\flexget\plugins\estimators\est_released.py", line 28, in estimate
        estimate = estimator(entry)
      File "d:\code\python\lib\site-packages\flexget\plugins\estimators\est_release_series_tvmaze.py", line 53, in estimate
        episode = lookup(**kwargs)
      File "d:\code\python\lib\site-packages\flexget\utils\database.py", line 34, in wrapper
        return func(*args, **kwargs)
      File "d:\code\python\lib\site-packages\flexget\plugins\internal\api_tvmaze.py", line 452, in episode_lookup
        TVMazeEpisodes.series_id == series.tvmaze_id)
      File "d:\code\python\lib\site-packages\sqlalchemy\orm\query.py", line 2698, in one_or_none
        "Multiple rows were found for one_or_none()")
    MultipleResultsFound: Multiple rows were found for one_or_none()

Additional information:

  • Flexget Version: latest
  • Python Version: dont know
  • Installation method: pip install
  • OS and version: windows 10 64b
  • Link to crash log: see crash log above

Please verify that the following data is present before submitting your issue:

-Paste or link to a paste service (pastebin for example) of relevant config (preferably full config including templates if present. Remember to redact any personal information!

  • Paste or link to a paste service of debug level logs of relevant task/s. Use flexget -L debug execute --tasks <Task_name>
  • Flexget version (Use flexget -V to get it).
  • Full Python version (2.7.11 for example). Run python -V to get it.
  • Installation method (pip, git install, etc.)
  • OS and version
  • Attach crash log if available

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions