#Overlays Error. Value Error: Year

1 messages · Page 1 of 1 (latest)

stuck slate
#

I am getting an error saying
ValueError: Year
I am trying to apply overlays on a 6000+ Movie Library. I will really appreciate any feedback.

primal abyssBOT
#

Welcome!

It looks like you have not yet completed #938455615741775902, this will allow us to help you quicker.

Someone from <@&938443185347244033> will assist when they're available.

Including the meta.log from the beginning is a huge help, type !logs for more information.

#

You can press the "Close Post" button above or type !close at any time to close this post.

carmine plume
#

Thanks

#

Can you provide a log file

gaunt rockBOT
#

Find meta.log in config/logs/

Drag it in the Discord thread - the whole thing, DO NOT EDIT IT

Log file too big? USE PASTEBIN or ZIP THE FILE

Still confused? ¯\(ツ)

stuck slate
carmine plume
#

Hm I don't think I've seen that before

#

Going to tag @fluid niche to review when he's available

stuck slate
#

Thanks

vast cove
#

@stuck slate side note, i would suggest setting up mdblist because you are getting one error related to that

#

so that you can update mass_audience_rating to mdb_tomatoesaudience

stuck slate
#

I will do that right now

#

Thanks

fluid niche
#

this is odd

#

basiclly its erroring out when i try and grab all collections from your server

#

from some reason the plexapi module is throwing an error trying to build one of the objects

stuck slate
#

Any suggestions on how to fix that?

carmine plume
#

Likely going to be something for Sohjiro to fix

fluid niche
#

not really anything i can do tbh

#

personally id delete all collections

#

one of them broke somewhere

#

hard to tell which one

#

if you comfortable with python i can walk you though how to figure it out without deleting collections

stuck slate
#

Sure, we can try

#

I will really appreciate it

fluid niche
#

or if your server is public and your comfortable with me trying you can send me your credentials

stuck slate
#

let's try first by you walking me through the process, if you don't mind. If my basic programming knowledge is not letting us fixing the problem, then of course I can give you access to my server

fluid niche
#

im fine with either ok first off you know how to run a python script correct?

stuck slate
#

right?

fluid niche
#

yea

#

how do you have pmm installed docker or local?

stuck slate
#

On my local computer and I am using it to connect to a headless server

#

headless remote server

fluid niche
#

ok so you have python installed on your local computer?

stuck slate
#

yes

fluid niche
#

do a pip install PlexAPI

stuck slate
#

ok

fluid niche
#

ok first lets make sure the error is still happening

#
import plexapi
from plexapi.server import PlexServer

PLEX_URL = ""
PLEX_TOKEN = ""
LIBRARY_NAME = "Movies"

ps = PlexServer(PLEX_URL, PLEX_TOKEN, timeout=600)
lib = next((s for s in ps.library.sections() if s.title == LIBRARY_NAME), None)

collections = lib._search(f"/library/sections/{lib.key}/all?type=18", None, 0, plexapi.X_PLEX_CONTAINER_SIZE)

for c in collections:
    print(c.title)
#

run this filling in the PLEX_URL, PLEX_TOKEN, and LIBRARY_NAME

stuck slate
#

without quotes?

#

I got the following error

#

Carloss-MacBook-Pro:~ carlosenriquetorrez$ python plex.py
File "plex.py", line 11
collections = lib._search(f"/library/sections/{lib.key}/all?type=18", None, 0, plexapi.X_PLEX_CONTAINER_SIZE)
^
SyntaxError: invalid syntax

gaunt rockBOT
#

SyntaxError: invalid syntax

This error normally implies that you are running an unsupported version of Python.

The python versions supported are as follows:
Plex Meta Manager: python 3.7 - 3.11
Plex Image Cleanup: python 3.11
PMM Overlay Reset: python 3.11

With the above in mind, we strongly recommend users run python 3.11 so that they are fully compliant with the suite of PMM products.

stuck slate
#

I've installed 3.11 and getting the same error

fluid niche
#

like this

import plexapi
from plexapi.server import PlexServer

PLEX_URL = "http://192.168.0.1:32400"
PLEX_TOKEN = "fghfdghdfghdfghgf"
LIBRARY_NAME = "Movies"

ps = PlexServer(PLEX_URL, PLEX_TOKEN, timeout=600)
lib = next((s for s in ps.library.sections() if s.title == LIBRARY_NAME), None)

collections = lib._search(f"/library/sections/{lib.key}/all?type=18", None, 0, plexapi.X_PLEX_CONTAINER_SIZE)

for c in collections:
    print(c.title)
stuck slate
#

Thanks

#

I got the following error

#

Carloss-MacBook-Pro:~ carlosenriquetorrez$ python3 plex.py
Traceback (most recent call last):
File "/Users/carlosenriquetorrez/plex.py", line 11, in <module>
collections = lib._search(f"/library/sections/{lib.key}/all?type=18", None, 0, plexapi.X_PLEX_CONTAINER_SIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/library.py", line 1532, in _search
subresults = self.fetchItems(key, container_start=container_start,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/library.py", line 450, in fetchItems
items = self.findItems(data, cls, ekey, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/base.py", line 313, in findItems
item = self._buildItemOrNone(elem, cls, initpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/base.py", line 102, in _buildItemOrNone
return self._buildItem(elem, cls, initpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/base.py", line 94, in _buildItem
return ecls(self._server, elem, initpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/base.py", line 57, in init
self._loadData(data)
File "/usr/local/lib/python3.11/site-packages/plexapi/collection.py", line 76, in _loadData
self.collectionPublished = utils.cast(bool, data.attrib.get('collectionPublished', '0'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/plexapi/utils.py", line 154, in cast
raise ValueError(value)
ValueError: Year

#

same error on PMM

heady musk
#

I'm also getting this error

#
[2023-04-30 16:19:39,984] [meta.py:1393]              [INFO]     |                                         Blade II Metadata                                          |
[2023-04-30 16:19:39,984] [meta.py:1393]              [INFO]     |====================================================================================================|
[2023-04-30 16:19:39,984] [meta.py:1527]              [DEBUG]    |                                                                                                    |
[2023-04-30 16:19:39,984] [meta.py:1528]              [DEBUG]    | Validating Method: year                                                                            |
[2023-04-30 16:19:39,984] [meta.py:1593]              [ERROR]    | Metadata Error: year attribute is blank                                                            |
[2023-04-30 16:19:39,984] [meta.py:1392]              [INFO]     |                                                                                                    |
[2023-04-30 16:19:39,984] [meta.py:1393]              [INFO]                                                                                                  |```
#

When I run nightly, its broken. When I run latest, it works

#

so definitely something changed

fluid niche
#

@heady musk its a completely different issue please open a separate thread

fluid niche
# stuck slate Thanks

run this

import plexapi
from plexapi.server import PlexServer

PLEX_URL = "http://192.168.0.1:32400"
PLEX_TOKEN = "fghfdghdfghdfghgf"
LIBRARY_NAME = "Movies"

ps = PlexServer(PLEX_URL, PLEX_TOKEN, timeout=600)
lib = next((s for s in ps.library.sections() if s.title == LIBRARY_NAME), None)

print(lib.key)
stuck slate
#

The result is 73

fluid niche
#

then in your browser go to PLEXURL/library/sections/73/all?type=18&X-Plex-Token=PLEXTOKEN

#

switch the PLEXURL and PLEXTOKEN out

stuck slate
#

got it

fluid niche
#

ex http://192.168.0.1:32400/library/sections/73/all?type=18&X-Plex-Token=fghfdghdfghdfghgf

#

download the xml file and send it to me please

stuck slate
#

I got the following error message
401 Unauthorized

fluid niche
#

then you have the url formatted wrong or the token is wrong

stuck slate
stuck slate
fluid niche
stuck slate
#

That is what I got

fluid niche
#

in plex

#

can you edit the Batman Collection

#

go to advance and screenshot whats there

stuck slate
fluid niche
#

humm not sure why but theres collectionPublished="Year" for that collection only

#

im willing to bet if you delete the collection youll be good

stuck slate