python-keepassx icon indicating copy to clipboard operation
python-keepassx copied to clipboard

ERRNO2 (File Not Found) when reading password from database (but 'list' works)

Open wraeth opened this issue 10 years ago • 3 comments

Listing passwords in the database seems to work fine, and getting the password retrieves some details until it attempts to use subprocess.py - it reads some details out of the database then fails:

kp -d .ssh/keepassx.kdb -k .ssh/id_rsa get 3a219f52b8df2f443a965b9519d1b947
Password: 

title:     My password
username:  wraeth
url:       https://mypasswordsite.com
notes:     
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/kp", line 7, in <module>
    sys.exit(main())
  File "/usr/lib64/python2.7/site-packages/keepassx/main.py", line 187, in main
    args.run(args)
  File "/usr/lib64/python2.7/site-packages/keepassx/main.py", line 96, in do_get
    clipboard.copy(entry.password)
  File "/usr/lib64/python2.7/site-packages/keepassx/clipboard.py", line 6, in copy
    get_clipboard().copy(text)
  File "/usr/lib64/python2.7/site-packages/keepassx/clipboard.py", line 22, in copy
    process = subprocess.Popen(self.COPY_PROCESS, stdin=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

wraeth avatar Jul 15 '15 13:07 wraeth

Looks like it's failing when it tries to copy the password to the clipboard. What platform are you running on?

jamesls avatar Jul 17 '15 18:07 jamesls

Currently running Gentoo with the following package versions:

dev-python/keepassx-0.1.0
dev-lang/python-{2.7.10,3.3.5,3.4.3}
x11-wm/awesome-3.5.6

Let me know if you want other details.

Additionally, perhaps the copy-to-clipboard function could be optional (if it isn't already - I haven't noticed an option to disable it)? Presumably this functionality doesn't get triggered when accessing a kdb through the API, but when working on a console (even from within X) I don't necessarily want/need the password copied to the clipboard.

wraeth avatar Jul 18 '15 04:07 wraeth

This happens when xclip is not installed. It should be mentioned in the README i guess.

lcbiazon avatar Feb 25 '16 16:02 lcbiazon