python-код pykeepass: объект «Нетип» не имеет атрибута «полезная нагрузка»

#python #oracle #payload #traceback #keepass

Вопрос:

 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'
 

Комментарии:

1. Совет, ставящий «срочно» или «пожалуйста, помогите как можно скорее» и т. Д. В вашем вопросе, как правило, Проходит очень плохо.