Comments (3)
Please post a traceback of the error
from ansible-keepass.
I'm on a different machine that actually has pyton 3.6 installed. But it shows the same error:
`bash> python3 kpsock.py test.kdbx
Password:
Open KeePass socket
Close KeePass socket
Traceback (most recent call last):
File "kpsock.py", line 114, in
run(_arg.kdbx, _psw, _arg.key, int(_arg.ttl))
File "kpsock.py", line 32, in run
with PyKeePass(kdbx, psw, kdbx_key) as kp:
File "/usr/lib/python3.6/site-packages/pykeepass/pykeepass.py", line 41, in init
transformed_key=transformed_key
File "/usr/lib/python3.6/site-packages/pykeepass/pykeepass.py", line 61, in read
transformed_key=transformed_key
File "/usr/lib/python3.6/site-packages/construct/core.py", line 325, in parse_file
return self.parse_stream(f, **contextkw)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 316, in parse_stream
return self._parsereport(stream, context, "(parsing)")
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 1979, in _parse
subobj = sc._parsereport(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 2468, in _parse
return self.subcon._parsereport(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 3663, in _parse
return sc._parsereport(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 1979, in _parse
subobj = sc._parsereport(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 2468, in _parse
return self.subcon._parsereport(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 328, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 2604, in _parse
return self.func(context) if callable(self.func) else self.func
File "/usr/lib/python3.6/site-packages/pykeepass/kdbx_parsing/kdbx4.py", line 56, in compute_transformed
key_composite
File "/usr/lib/python3.6/site-packages/pykeepass/kdbx_parsing/common.py", line 90, in aes_kdf
keyfile=keyfile
File "/usr/lib/python3.6/site-packages/pykeepass/kdbx_parsing/common.py", line 107, in compute_key_composite
password_composite = hashlib.sha256(password.encode('utf-8')).digest()
AttributeError: 'bytes' object has no attribute 'encode'
`
from ansible-keepass.
I have no idea how to reproduce the problem. According to the traceback the error raised in depended package pykeepass
, because expected a password in string type.
I'm added validation in kpsock.py
for entered password to convert bytes to string.
Not sure that will fix the error. Please check if possible.
from ansible-keepass.
Related Issues (20)
- Entry <name> not found HOT 2
- python-pykeepass 4.0.0 HOT 2
- global name 'FileNotFoundError' HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ansible-keepass-6d5c20be.sock' HOT 20
- Plugin does not suppport lookup of properties/attributes with several lines HOT 5
- Add module to collection for writing attachments to file system HOT 5
- Password shall not be mandatory for opening the db
- KeePass: socket connection failed when used in parallel HOT 2
- backslashes are being escaped in password HOT 2
- Concurrent access on testing socket file and creating associated process HOT 7
- Using a kbdx over https HOT 1
- Socket location HOT 2
- Temp files should be in tmpfs HOT 4
- Support for database editting HOT 3
- Implementation as cache plugin HOT 6
- Unable to get attachments HOT 1
- custom_properties - long chain are truncated
- Search for DB entry by title/url + regex HOT 1
- Recover the attachment contents directly
- Cannot assign db and password variable from other variables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-keepass.