jesseward / plex-lastfm-scrobbler

Scrobble played audio items Last.FM from the Plex Media Server application.
MIT License
91 stars 13 forks source link

Getting random fails #28

Closed adamors closed 9 years ago

adamors commented 9 years ago

I'm keep getting this error:

Exception in thread Thread-2:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner  self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 761, in run  self.__target(*self.__args, **self.__kwargs)
File "/Library/Python/2.7/site-packages/plex_scrobble/plex_monitor.py", line 146, in monitor_log metadata = fetch_metadata(played, config)
File "/Library/Python/2.7/site-packages/plex_scrobble/plex_monitor.py", line 55, in fetch_metadata logger.error('Timeout reading from {url} \'{error}\''.format(url, error=e))
KeyError: 'url'`

I'm on OS X and my Plex library is on an external HDD. I'm guessing that when I'm listening to longer tracks, the HDD will go to sleep and this causes the timeout? I'm not really at home with Python.

jesseward commented 9 years ago

hi @adamors , looks like the request to fetch the metadata from Plex server was taking more than 2 seconds. In this case the script ignores that log line and moves on to the next. The problem was that the line responsible for logging that entry in the plex_monitor.py script had a poorly written syntax error. thanks for reporting this.

I have applied the fix in the above commit. You will want to grab the last via GIT and reinstall and rerun the plex-lastfm-scrobbler script.

adamors commented 9 years ago

Thank you!