0
from pykeepass import PyKeePass

try:
        kp = PyKeePass("newdb.kdb", password="qwerty@123")
except:
        print("Got exception")

lstEntry = kp.find_entries_by_notes(".*testing.*",regex=True)

print(lstEntry)

下面是错误

Traceback (most recent call last):
  File "keeps.py", line 8, in <module>
    lstEntry = kp.find_entries_by_notes(".*testing.*",regex=True)
  File "/home/oracle/env/lib64/python3.6/site-packages/pykeepass/pykeepass.py", line 564, in find_entries_by_notes
    first=first
  File "/home/oracle/env/lib64/python3.6/site-packages/pykeepass/pykeepass.py", line 508, in find_entries
    res = self._find(prefix, entry_xp, path=path, tree=group, **kwargs)
  File "/home/oracle/env/lib64/python3.6/site-packages/pykeepass/pykeepass.py", line 362, in _find
    **kwargs
  File "/home/oracle/env/lib64/python3.6/site-packages/pykeepass/pykeepass.py", line 279, in _xpath
    tree = self.tree
  File "/home/oracle/env/lib64/python3.6/site-packages/pykeepass/pykeepass.py", line 200, in tree
    return self.kdbx.body.payload.xml
AttributeError: 'NoneType' object has no attribute 'payload'
4

0 回答 0