jesseward / plex-lastfm-scrobbler

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

Windows anydbm.error #25

Closed gabotronix closed 9 years ago

gabotronix commented 9 years ago

Hi,

I just upgraded to the latest version. I did the whole installation again:

  1. Cleared plex_scrobble.log
  2. Removed C:\Python27\Scripts\plex-scrobble.py
  3. Deleted the entire C:\plex-lastfm-scrobbler
  4. Extracted the new plex-lastfm-scrobbler
  5. Ran python setup.py install from C:\plex-lastfm-scrobbler
  6. Ran python plex-scrobble.py from C:\Python27\Scripts
c:\Python27\Scripts>python plex-scrobble.py
Traceback (most recent call last):
  File "plex-scrobble.py", line 124, in <module>
    c = cache_retry(config)
  File "plex-scrobble.py", line 40, in cache_retry
    cache = ScrobbleCache(config)
  File "C:\Python27\lib\site-packages\plex_scrobble\scrobble_cache.py", line 16,
 in __init__
    writeback=True)
  File "C:\Python27\lib\shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "C:\Python27\lib\shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "C:\Python27\lib\anydbm.py", line 82, in open
    raise error, "db type could not be determined"
anydbm.error: db type could not be determined

Here's my log file:

2014-11-13 23:26:13,736 [1164] [main <module>] [DEBUG] config : mediaserver_log_location -> C:\Users\Piranha\AppData\Local\Plex Media Server\Logs\Plex Media Server.log
2014-11-13 23:26:13,737 [1164] [main <module>] [DEBUG] config : session -> C:\Users\Piranha/.config/plex-lastfm-scrobbler/session_key
2014-11-13 23:26:13,737 [1164] [main <module>] [DEBUG] config : mediaserver_url -> http://localhost:32400
2014-11-13 23:26:13,739 [1164] [main <module>] [DEBUG] config : config file location -> C:\Users\Piranha/.config/plex-lastfm-scrobbler/plex_scrobble.conf
2014-11-13 23:26:13,739 [1164] [main <module>] [DEBUG] config : log_file -> C:\plex-lastfm-scrobbler\plex_scrobble.log
2014-11-13 23:26:13,740 [1164] [main <module>] [DEBUG] config : cache_location -> C:\plex-lastfm-scrobbler\plex_scrobble.cache
2014-11-13 23:26:13,742 [1164] [main <module>] [DEBUG] using last.fm session key=C:\Users\Piranha/.config/plex-lastfm-scrobbler/session_key , st_mtime=Thu Nov 13 23:12:42 2014
2014-11-13 23:26:13,743 [1164] [main cache_retry] [INFO] starting cache_retry thread.
jesseward commented 9 years ago

hi @gabotronix , the exception is generated from the 'shelve' functionality. This is used to write a python data-structure to disk on the event of a scrobble failure. These are retried at 60 minute intervals.

try removing C:\plex-lastfm-scrobbler\plex_scrobble.cache from your system and restart the plex-scrobbler service. It is likely the change in Python versions causes read issues on the cache file. I will add a task to catch this scenario.

Please update this ticket if removing the cache solves (or doesn't) your issue.

gabotronix commented 9 years ago

Hello @jesseward,

Sorry for the very late reply. Thanks! Deleting the _plexscrobble.cache file fixed it. I'm able to scrobble again.