Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named kdbx_parsing.kdbx #144

Closed
Bastilla123 opened this issue Mar 7, 2019 · 4 comments
Closed

No module named kdbx_parsing.kdbx #144

Bastilla123 opened this issue Mar 7, 2019 · 4 comments

Comments

@Bastilla123
Copy link

I write a littel skript:

from pykeepass import PyKeePass

load database

kp = PyKeePass('neue.kdbx', password='Password1234')

Result:

Traceback (most recent call last):
File "test.py", line 1, in
from pykeepass import PyKeePass
File "/home/sebastian/Downloads/pykeepass-master/pykeepass/pykeepass.py", line 16, in
from pykeepass.kdbx_parsing.kdbx import KDBX
ImportError: No module named kdbx_parsing.kdbx

i don't understand in pykeepass.py the row:

from pykeepass.kdbx_parsing.kdbx import KDBX

@jugmac00
Copy link
Contributor

jugmac00 commented Mar 7, 2019

Hi @Bastilla123

You are importing erroneously from the module pykeepass instead from the package pykeepass, see my screenshot.

screenshot from 2019-03-07 19-50-04

Then, the relative references do not work any longer.

The line
from pykeepass.kdbx_parsing.kdbx import KDBX
is nothing special.

It just means from module kdbx from within the kdbx_parsing package inside the pykeepass package import the symbol KDBX - which - when you have a look at it - is an instance of the Struct class.

Which - we both know now - does not work when you try to import from the module pykeepass instead from the package.

P.S.: I wrote a little command line utility, which checks all passwords within a KeePass database against the HaveIBeenPwned.com API (is my password hacked?) -you could have a look at it to get some ideas how to interact with PyKeePass.

package
https://pypi.org/project/hibpcli/

source code
https://github.com/jugmac00/hibpcli

@Bastilla123
Copy link
Author

Thank you very much. I'm beginner in python.

@Evidlo
Copy link
Member

Evidlo commented Mar 19, 2019

Can this be closed?

@Bastilla123
Copy link
Author

Bastilla123 commented Mar 19, 2019 via email

@Evidlo Evidlo closed this as completed Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants