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

AttributeError: 'Album' object has no attribute 'locations' #1480

Closed
zpz5HAU-tgc3fgw2xwr opened this issue Jun 25, 2023 · 0 comments
Closed
Assignees
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet

Comments

@zpz5HAU-tgc3fgw2xwr
Copy link

Version Number

1.19.0

What branch are you on?

master

Describe the Bug

I started trying to debug some label collections for my music library today. I'm pretty sure everything in my config is correct now after adding the "builder_level: album" part, and it looks like it's finding the albums and starting it's attempt to apply the labels before throwing this AttributeError.

[2023-06-25 10:35:45,415] [builder.py:198]            [INFO]     |========================================================================================================================================================================================================|
[2023-06-25 10:35:45,417] [builder.py:198]            [INFO]     |                                                                                     TestLabel Collection in Music                                                                                      |
[2023-06-25 10:35:45,418] [builder.py:198]            [INFO]     |========================================================================================================================================================================================================|
[2023-06-25 10:35:45,419] [builder.py:199]            [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,420] [builder.py:238]            [INFO]     |================================================================================== Validating TestLabel Attributes =====================================================================================|
[2023-06-25 10:35:45,424] [plex.py:940]               [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,426] [plex.py:943]               [DEBUG]    | Looking for: TestLabel                                                                                                                                                                                 |
[2023-06-25 10:35:45,427] [builder.py:453]            [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,428] [builder.py:454]            [DEBUG]    | Validating Method: builder_level                                                                                                                                                                       |
[2023-06-25 10:35:45,429] [builder.py:458]            [DEBUG]    | Value: album                                                                                                                                                                                           |
[2023-06-25 10:35:45,431] [builder.py:728]            [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,432] [builder.py:729]            [DEBUG]    | Validating Method: build_collection                                                                                                                                                                    |
[2023-06-25 10:35:45,433] [builder.py:730]            [DEBUG]    | Value: False                                                                                                                                                                                           |
[2023-06-25 10:35:45,434] [builder.py:886]            [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,435] [builder.py:890]            [DEBUG]    | Validating Method: item_label                                                                                                                                                                          |
[2023-06-25 10:35:45,436] [builder.py:891]            [DEBUG]    | Value: Test                                                                                                                                                                                            |
[2023-06-25 10:35:45,438] [builder.py:886]            [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,440] [builder.py:890]            [DEBUG]    | Validating Method: plex_search                                                                                                                                                                         |
[2023-06-25 10:35:45,441] [builder.py:891]            [DEBUG]    | Value: ordereddict([('any', ordereddict([('album_released.after', '01/01/2018')]))])                                                                                                                   |
[2023-06-25 10:35:45,443] [builder.py:1068]           [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,444] [builder.py:1069]           [INFO]     | Validation Successful                                                                                                                                                                                  |
[2023-06-25 10:35:45,445] [plex_meta_manager.py:695]  [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,446] [plex_meta_manager.py:697]  [INFO]     |=================================================================================== Running TestLabel Collection =======================================================================================|
[2023-06-25 10:35:45,447] [plex_meta_manager.py:711]  [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,449] [plex_meta_manager.py:712]  [INFO]     | Sync Mode: append                                                                                                                                                                                      |
[2023-06-25 10:35:45,450] [plex_meta_manager.py:715]  [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,451] [plex_meta_manager.py:716]  [DEBUG]    | Builder: plex_search: (9, "Plex Album Search\nSort By: ['title.asc']\nFilter:\n  Match any of the following:\n    Album Released is after 2018-01-01", '?type=9&sort=titleSort&push=1&album.originallyAvailableAt%3E%3E=2018-01-01&pop=1') |
[2023-06-25 10:35:45,452] [plex_meta_manager.py:717]  [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:45,453] [plex.py:1029]              [INFO]     | Processing Plex Album Search                                                                                                                                                                           |
                                                                 | Sort By: ['title.asc']                                                                                                                                                                                 |
                                                                 | Filter:                                                                                                                                                                                                |
                                                                 |   Match any of the following:                                                                                                                                                                          |
                                                                 |     Album Released is after 2018-01-01                                                                                                                                                                 |
[2023-06-25 10:35:46,035] [builder.py:1853]           [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:46,037] [builder.py:1854]           [DEBUG]    | 789 IDs Found                                                                                                                                                                                          |
[2023-06-25 10:35:46,038] [builder.py:1856]           [DEBUG]    |                                                                                                                                                                                                        |
[2023-06-25 10:35:56,667] [builder.py:2738]           [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:56,668] [builder.py:2739]           [INFO]     |=============================================================================== Items Found for TestLabel Collection ===================================================================================|
[2023-06-25 10:35:56,669] [builder.py:2740]           [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:56,670] [builder.py:2746]           [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:56,671] [builder.py:2747]           [INFO]     |======================================================================= Updating Details of the Items in TestLabel Collection ==========================================================================|
[2023-06-25 10:35:56,672] [builder.py:2748]           [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:57,259] [plex.py:1147]              [INFO]     | &TWICE -Repackage-        | Label | +Test                                                                                                                                                              |
[2023-06-25 10:35:57,263] [plex_meta_manager.py:833]  [DEBUG]    | Traceback (most recent call last):                                                                                                                                                                     |
                                                                 |   File "//plex_meta_manager.py", line 799, in run_collection                                                                                                                                           |
                                                                 |     builder.update_item_details()                                                                                                                                                                      |
                                                                 |   File "/modules/builder.py", line 2776, in update_item_details                                                                                                                                        |
                                                                 |     path = os.path.dirname(str(item.locations[0])) if self.library.is_movie else str(item.locations[0])                                                                                                |
                                                                 |                                                                                      ^^^^^^^^^^^^^^                                                                                                    |
                                                                 |   File "/usr/local/lib/python3.11/site-packages/plexapi/base.py", line 488, in __getattribute__                                                                                                        |
                                                                 |     value = super(PlexPartialObject, self).__getattribute__(attr)                                                                                                                                      |
                                                                 |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                      |
                                                                 | AttributeError: 'Album' object has no attribute 'locations'                                                                                                                                            |
                                                                 |                                                                                                                                                                                                        |
[2023-06-25 10:35:57,273] [plex_meta_manager.py:834]  [ERROR]    | Unknown Error: 'Album' object has no attribute 'locations'                                                                                                                                             |
[2023-06-25 10:35:57,274] [plex_meta_manager.py:839]  [INFO]     |                                                                                                                                                                                                        |
[2023-06-25 10:35:57,275] [plex_meta_manager.py:840]  [INFO]     |========================================================================================================================================================================================================|
[2023-06-25 10:35:57,275] [plex_meta_manager.py:840]  [INFO]     |                                                                                    Finished TestLabel Collection                                                                                       |
[2023-06-25 10:35:57,276] [plex_meta_manager.py:840]  [INFO]     |                                                                                      Collection Run Time: 0:00:11                                                                                      |
[2023-06-25 10:35:57,277] [plex_meta_manager.py:840]  [INFO]     |========================================================================================================================================================================================================|

Relevant Collection/Overlay/Playlist Definition

collections:
  "TestLabel":
    build_collection: false
    item_label: Test
    builder_level: album
    plex_search:
      any:
        album_released.after: 01/01/2018

Logs

No response

@zpz5HAU-tgc3fgw2xwr zpz5HAU-tgc3fgw2xwr added bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug is with Plex Meta Manager status:not-yet-viewed I haven't reviewed the Feature or Bug yet
Projects
None yet
Development

No branches or pull requests

2 participants