Skip to content

Problem with shelf #7

Closed
langner opened this Issue Oct 26, 2012 · 2 comments

2 participants

@langner
langner commented Oct 26, 2012

Sometimes my daemon does not start and I get this error in the log:

12:56:53 : CANTO-DAEMON -> Exiting on exception:
12:56:53 : CANTO-DAEMON -> 
Traceback (most recent call last):
  File "/usr/lib/python3.2/shelve.py", line 111, in __getitem__
    value = self.cache[key]
KeyError: 'http://github.com/blog.atom'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 786, in start
    self.init()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 124, in init
    self.get_config()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 771, in get_config
    self.conf.parse()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/config.py", line 101, in parse
    self.instantiate()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/config.py", line 299, in instantiate
    feed["url"], feed["rate"], feed["keep"], **kws)
  File "/usr/local/lib/python3.2/dist-packages/canto_next/feed.py", line 106, in __init__
    self.index()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/feed.py", line 231, in index
    self.update_contents = self.shelf[self.URL]
  File "/usr/local/lib/python3.2/dist-packages/canto_next/storage.py", line 44, in __getitem__
    r = self.shelf[name]
  File "/usr/lib/python3.2/shelve.py", line 114, in __getitem__
    value = Unpickler(f).load()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdc in position 3648: invalid continuation byte

Traceback (most recent call last):
  File "/usr/local/bin/canto-daemon", line 7, in <module>
    c = CantoBackend()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 806, in __init__
    self.start()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 801, in start
    self.exit()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/server.py", line 116, in exit
    for conn, t in self.connections:
AttributeError: 'CantoBackend' object has no attribute 'connections'

Deleting the feeds database file fixes this, but I don't want to keep doing that. This usually happens when I copy the feed database file between computers or the daemon/client crashes, although I haven't narrowed it down between those two. I don't suspect the machine change, sincle shelves are independent of architecture as are pickles as far as I know.

@langner
langner commented Oct 30, 2012

One situation this happens is if I kill the canto daemon... I know that's not a nice thing to do :) but it should be stable enough to survive a kill IMO.

@themoken
Owner
themoken commented Mar 5, 2013

I haven't been able to reproduce this and I frequently hard kill canto-daemon. If you're still regularly getting this on c-d from git, re-open this bug.

@themoken themoken closed this Mar 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.