codedninja / plexmedia-downloader

Offline download media from Plex Media Server
31 stars 11 forks source link

KeyError: 'address' #10

Open LampPrinter opened 1 year ago

LampPrinter commented 1 year ago

Getting this.

url = self.server["address"]+self.rating_key
~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'address'

Hopefully someone with knowledge can look into it.

cgmckeever commented 1 year ago

Did this just start happening from a working setup? Or is this your initial setup?

Just verified that using the latest release with the login patch is still working

https://github.com/codedninja/plexmedia-downloader/pull/9/files

This is my fetch script, where plex pass and user are environment vars

#!/bin/bash

IFSO=$IFS
IFS=$'\n'

LIST="
https://app.plex.tv/desktop/#!/server/rest-of-the-address
"

for url in $LIST
do
    echo ${url: -10}
    python3 main.py -u ${PLEXUSER} -p ${PLEXPASS} $url
done
LampPrinter commented 1 year ago

I am part of 2 servers. It is working on one and not on another. Any way to debug?

I get this

Logged in as: xxxxxxxx
Found 17 servers
Getting urls of content to download.
Traceback (most recent call last):
  File "/Users/xxxxxxx/Downloads/main.py", line 303, in <module>
    plex.command_line()
  File "/Users/xxxxxxxx/Downloads/main.py", line 295, in command_line
    self.download()
  File "/Users/xxxxxxxx/Downloads/main.py", line 213, in download
    contents = self._get_metadata()
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxxxxxxx/Downloads/main.py", line 192, in _get_metadata
    url = self.server["address"]+self.rating_key
          ~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'address'
cgmckeever commented 1 year ago

This sounds like something not configured/parsed right .. I would debug what this variable is and see why its yelling about address (outside it obviously not being there), but it may indicate where the misconfig is


self.server
``
LampPrinter commented 1 year ago

Any progress?

LampPrinter commented 1 year ago

Bumping again. Hoping somebody fixes this. @cgmckeever

cgmckeever commented 1 year ago

I dont think anyone has looked into it, and it also seems like its not something consistent. did you try this? Compared across the two installs?

I would debug what this variable is and see why its yelling about address (outside it obviously not being there), but it may indicate where the misconfig is
cgmckeever commented 1 year ago

@LampPrinter just installed this fresh, on a fresh OS install w/ python ... didnt hit this error