[issue37241] Item Count Error in Shelf

Jesse Bacon report at bugs.python.org
Wed Jun 12 11:18:14 EDT 2019


Jesse Bacon <jessembacon at me.com> added the comment:

I am missing keys, when extracting the data back out with todays NVD pull.
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/anaconda3/lib/python3.6/shelve.py in __getitem__(self, key)
    110         try:
--> 111             value = self.cache[key]
    112         except KeyError:

KeyError: 'CVE-2019-1842'

During handling of the above exception, another exception occurred:

KeyError                                  Traceback (most recent call last)
<ipython-input-62-aeb8a14b4774> in <module>
      1 results = []
      2 for x in raw_cves:
----> 3     results.append(db[x])

~/anaconda3/lib/python3.6/shelve.py in __getitem__(self, key)
    111             value = self.cache[key]
    112         except KeyError:
--> 113             f = BytesIO(self.dict[key.encode(self.keyencoding)])
    114             value = Unpickler(f).load()
    115             if self.writeback:

KeyError: b'CVE-2019-1842'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37241>
_______________________________________


More information about the Python-bugs-list mailing list