jampe/kp2bw

ImportError: attempted relative import with no known parent package

philiplb opened this issue · 2 comments

On importing via python3 kp2bw/kp2bw.py -v -kpfile myDB.kdbx, I get the following error:

Traceback (most recent call last):
  File "kp2bw/kp2bw.py", line 7, in <module>
    from .convert import Converter
ImportError: attempted relative import with no known parent package
  • OS: Ubuntu 20.04
  • Python version: 3.8.10
  • Bitwarden cli version: 1.21.1

Quick and dirty fix: Rewrite imports (remove .)
In "kp2bw.py" you should have :
from convert import Converter
In "convert.py" you should have :
from bitwardenclient import BitwardenClient

This should work. Tested with Python 3.7.12, Ubuntu 20.04.

That looks good, thank you!