python-plexlibrary icon indicating copy to clipboard operation
python-plexlibrary copied to clipboard

Error running plexlibrary

Open memnos opened this issue 2 years ago • 0 comments

Hello, i've just install Python-plexlibrary when i run: python3 plexlibrary avangers

i have this error, what could it be? I'm sure plex is running and the port is ok.

Traceback (most recent call last): File "/opt/python-plexlibrary/plexlibrary/plexutils.py", line 16, in init self.server = plexapi.server.PlexServer( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xxxxxx/.local/lib/python3.11/site-packages/plexapi/server.py", line 115, in init data = self.query(self.key, timeout=self._timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xxxxx/.local/lib/python3.11/site-packages/plexapi/server.py", line 746, in query response = method(url, headers=headers, timeout=timeout, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/requests/sessions.py", line 575, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/requests/sessions.py", line 486, in prepare_request p.prepare( File "/usr/lib/python3/dist-packages/requests/models.py", line 369, in prepare self.prepare_headers(headers) File "/usr/lib/python3/dist-packages/requests/models.py", line 491, in prepare_headers check_header_validity(header) File "/usr/lib/python3/dist-packages/requests/utils.py", line 1037, in check_header_validity raise InvalidHeader( requests.exceptions.InvalidHeader: Header part ('xxxxxxxxxxxxxxxxxx') from {'X-Plex-Token': 'xxxxxxxxxxxxxxx'} must be of type str or bytes, not <class 'ruamel.yaml.scalarstring.SingleQuotedScalarString'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/opt/python-plexlibrary/plexlibrary/main.py", line 8, in main() File "/opt/python-plexlibrary/plexlibrary/plexlibrary.py", line 66, in main r = Recipe(recipe_name=args.recipe, use_playlists=args.playlists) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/python-plexlibrary/plexlibrary/recipe.py", line 212, in init self.plex = plexutils.Plex(self.config['plex']['baseurl'], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/python-plexlibrary/plexlibrary/plexutils.py", line 19, in init raise Exception("No Plex server found at: {base_url}".format( Exception: No Plex server found at: http://localhost:32400

memnos avatar Jul 16 '23 09:07 memnos