Skip to content

IPv6 Not properly support in settings.py (too many values to unpack) #360

Open
@engelde

Description

@engelde

Hello!

First off, thank you for the great project. I’ve been using it to randomly mix trailers and set them as preroll videos in Plex. Until recently, it has worked absolutely perfectly.

Unfortunately I’m now seeing the following error with plexapi.settings. Has something changed with Plex’s API that might cause this? I’m using python 3.7 and, for reference and just in case it helps, the code I am running can be found here: https://github.com/airship-david/Plex-Apple-Preroll-Trailers/blob/master/mix.py.

Let me know if I need to provide any additional info. I would definitely appreciate any ideas you might have. Thanks!

Traceback (most recent call last):
  File "mix.py", line 77, in <module>
    main()
  File "mix.py", line 67, in main
    plex_settings = plex.settings.get('CinemaTrailersPrerollID')
  File "/usr/local/lib/python3.7/site-packages/plexapi/server.py", line 178, in settings
    self._settings = Settings(self, data)
  File "/usr/local/lib/python3.7/site-packages/plexapi/settings.py", line 20, in __init__
    super(Settings, self).__init__(server, data, initpath)
  File "/usr/local/lib/python3.7/site-packages/plexapi/base.py", line 48, in __init__
    self._loadData(data)
  File "/usr/local/lib/python3.7/site-packages/plexapi/settings.py", line 40, in _loadData
    self._settings[id] = Setting(self._server, elem, self._initpath)
  File "/usr/local/lib/python3.7/site-packages/plexapi/base.py", line 48, in __init__
    self._loadData(data)
  File "/usr/local/lib/python3.7/site-packages/plexapi/settings.py", line 124, in _loadData
    self.enumValues = self._getEnumValues(data)
  File "/usr/local/lib/python3.7/site-packages/plexapi/settings.py", line 138, in _getEnumValues
    return {self._cast(k): v for k, v in [kv.split(':') for kv in enumstr.split('|')]}
  File "/usr/local/lib/python3.7/site-packages/plexapi/settings.py", line 138, in <dictcomp>
    return {self._cast(k): v for k, v in [kv.split(':') for kv in enumstr.split('|')]}
ValueError: too many values to unpack (expected 2)

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