joelbarrette / plexmusic-rating-sync

MIT License
19 stars 6 forks source link

Can't connect to library #1

Open palla89 opened 2 years ago

palla89 commented 2 years ago

Hi! At first, let me tell you that I think this is an awesome idea and I'm really looking forward to use it! I have to transfer some genres of songs from my main library to a dedicated one and I will lose every rating I've added in the last year, so this tool could be perfect for what I'd need!

The problem: I edited the script compiling the library name and putting in my account, but when I launch the script it gives me this error:

Traceback (most recent call last): File "proof-of-concept.py", line 16, in <module> plex = account.resource(LIB).connect() File "/volume1/Core/plexmusic-rating-sync/plexratings/lib/python3.8/site-packages/plexapi/myplex.py", line 204, in resource raise NotFound(f'Unable to find resource {name}') plexapi.exceptions.NotFound: Unable to find resource Musica

Am I missing something? Thank you!

Pe6r0 commented 1 year ago

you cannot use 'LIB'when you browse your library. @joelbarrette : please change this.

this should work:

for album in plex.library.section('Music').albums():

Pe6r0 commented 1 year ago

I ended up forking it and adding the fix myself, it's in https://github.com/Pe6r0/plexmusic-rating-sync

ThinkWithPbody commented 1 year ago

I ended up forking it and adding the fix myself, it's in https://github.com/Pe6r0/plexmusic-rating-sync

I tried your fix but I'm getting the same error.

Traceback (most recent call last):
  File "D:\_twp\Software\Plex\plexmusic-rating-sync\Pe6r0-proof-of-concept.py", line 44, in <module>
    plex = account.resource(LIB).connect()
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\plexapi\myplex.py", line 289, in resource
    raise NotFound(f'Unable to find resource {name}')
plexapi.exceptions.NotFound: Unable to find resource Music