Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Error: 'NoneType' object is not iterable #219

Closed
omerher opened this issue Apr 28, 2021 · 1 comment
Closed

Unknown Error: 'NoneType' object is not iterable #219

omerher opened this issue Apr 28, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@omerher
Copy link

omerher commented Apr 28, 2021

Started happening a few days ago.

[2021-04-27 16:52:47,242] [builder.py:1024]           [DEBUG]    | Value: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition                         |
[2021-04-27 16:52:47,242] [trakttv.py:168]            [DEBUG]    | Data: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition                          |
[2021-04-27 16:52:47,633] [trakttv.py:185]            [INFO]     | Processing Trakt List: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition         |
[2021-04-27 16:52:47,654] [util.py:313]               [DEBUG]    | Traceback (most recent call last):                                                                 |
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\config.py", line 544, in update_libraries
                                                                 |     builder.run_methods(collection_obj, collection_name, rating_key_map, movie_map, show_map)
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\builder.py", line 1038, in run_methods
                                                                 |     elif "trakt" in method:                             items_found += check_map(self.config.Trakt.get_items(method, value, self.library.is_movie))
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\trakttv.py", line 186, in get_items
                                                                 |     for trakt_item in trakt_items:
                                                                 | TypeError: 'NoneType' object is not iterable
                                                                 | 
[2021-04-27 16:52:47,654] [config.py:559]             [ERROR]    | Unknown Error: 'NoneType' object is not iterable

Movies.yml:

templates:
  List:
    optional:
      - imdb_url
      - trakt_url
    default:
      prefix: "/"
    imdb_list: <<imdb_url>>
    trakt_list: <<trakt_url>>
    summary: <<summary>>
    sort_title: '<<prefix>><<num>>'
    collection_order: alpha
    collection_mode: hide_items
    sync_mode: sync

collections:
  Reddit Top 250:
    template: {name: List, trakt_url: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition, summary: "A collection of Reddit's Top 250 Movies (2019).", num: '004'}

Log file:

[2021-04-27 16:52:46,931] [util.py:356]               [INFO]     |====================================================================================================|
[2021-04-27 16:52:46,932] [util.py:360]               [INFO]     |                                     Reddit Top 250 Collection                                      |
[2021-04-27 16:52:46,932] [util.py:361]               [INFO]     |====================================================================================================|
[2021-04-27 16:52:46,932] [config.py:507]             [INFO]     |                                                                                                    |
[2021-04-27 16:52:46,933] [builder.py:342]            [INFO]     | Scanning Reddit Top 250 Collection                                                                 |
[2021-04-27 16:52:46,933] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:46,933] [builder.py:371]            [DEBUG]    | Validating Method: template                                                                        |
[2021-04-27 16:52:46,933] [builder.py:372]            [DEBUG]    | Value: ordereddict([('name', 'List'), ('trakt_url', 'https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition'), ('summary', "A collection of Reddit's Top 250 Movies (2019)."), ('num', '004')]) |
[2021-04-27 16:52:46,933] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:46,933] [builder.py:371]            [DEBUG]    | Validating Method: trakt_list                                                                      |
[2021-04-27 16:52:46,933] [builder.py:372]            [DEBUG]    | Value: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition                         |
[2021-04-27 16:52:47,133] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,133] [builder.py:371]            [DEBUG]    | Validating Method: summary                                                                         |
[2021-04-27 16:52:47,133] [builder.py:372]            [DEBUG]    | Value: A collection of Reddit's Top 250 Movies (2019).                                             |
[2021-04-27 16:52:47,133] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,133] [builder.py:371]            [DEBUG]    | Validating Method: sort_title                                                                      |
[2021-04-27 16:52:47,133] [builder.py:372]            [DEBUG]    | Value: /004                                                                                        |
[2021-04-27 16:52:47,133] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,133] [builder.py:371]            [DEBUG]    | Validating Method: collection_order                                                                |
[2021-04-27 16:52:47,133] [builder.py:372]            [DEBUG]    | Value: alpha                                                                                       |
[2021-04-27 16:52:47,133] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,133] [builder.py:371]            [DEBUG]    | Validating Method: collection_mode                                                                 |
[2021-04-27 16:52:47,133] [builder.py:372]            [DEBUG]    | Value: hide_items                                                                                  |
[2021-04-27 16:52:47,133] [builder.py:370]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,134] [builder.py:371]            [DEBUG]    | Validating Method: sync_mode                                                                       |
[2021-04-27 16:52:47,134] [builder.py:372]            [DEBUG]    | Value: sync                                                                                        |
[2021-04-27 16:52:47,137] [config.py:530]             [INFO]     |                                                                                                    |
[2021-04-27 16:52:47,137] [config.py:532]             [INFO]     | Sync Mode: sync                                                                                    |
[2021-04-27 16:52:47,241] [builder.py:998]            [DEBUG]    |                                                                                                    |
[2021-04-27 16:52:47,241] [builder.py:999]            [DEBUG]    | Method: trakt_list                                                                                 |
[2021-04-27 16:52:47,242] [builder.py:1000]           [DEBUG]    | Values: ['https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition']                    |
[2021-04-27 16:52:47,242] [builder.py:1023]           [INFO]     |                                                                                                    |
[2021-04-27 16:52:47,242] [builder.py:1024]           [DEBUG]    | Value: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition                         |
[2021-04-27 16:52:47,242] [trakttv.py:168]            [DEBUG]    | Data: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition                          |
[2021-04-27 16:52:47,633] [trakttv.py:185]            [INFO]     | Processing Trakt List: https://trakt.tv/users/jay-greene/lists/reddit-top-250-2019-edition         |
[2021-04-27 16:52:47,654] [util.py:313]               [DEBUG]    | Traceback (most recent call last):                                                                 |
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\config.py", line 544, in update_libraries
                                                                 |     builder.run_methods(collection_obj, collection_name, rating_key_map, movie_map, show_map)
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\builder.py", line 1038, in run_methods
                                                                 |     elif "trakt" in method:                             items_found += check_map(self.config.Trakt.get_items(method, value, self.library.is_movie))
                                                                 |   File "C:\Users\hersh\Documents\Plex Meta Manager\modules\trakttv.py", line 186, in get_items
                                                                 |     for trakt_item in trakt_items:
                                                                 | TypeError: 'NoneType' object is not iterable
                                                                 | 
[2021-04-27 16:52:47,654] [config.py:559]             [ERROR]    | Unknown Error: 'NoneType' object is not iterable
[2021-04-27 16:52:47,655] [config.py:505]             [INFO]     | 
[2021-04-27 16:52:47,655] [util.py:356]               [INFO]     |====================================================================================================|
@meisnate12
Copy link
Member

This is actually a duplicate of #166 The trakt.py package has a bug where it wont be able to work with usernames that have a space in them. I fixed the bug in the package almost a month ago but the pull request hasnt been accepted yet so im just waiting on that

@meisnate12 meisnate12 added the duplicate This issue or pull request already exists label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants