enpass-to-keepass icon indicating copy to clipboard operation
enpass-to-keepass copied to clipboard

issue with csv.reader

Open aadm opened this issue 7 years ago • 1 comments
trafficstars

Thanks for the script and the thorough writeup on your blog. I wanted to use it to go back to Keepass after having tried Enpass for a while but it didn't work for me. This was the error:

Traceback (most recent call last):
  File "enpass-to-keepass.py", line 84, in <module>
    main(parser.parse_args())
  File "enpass-to-keepass.py", line 33, in main
    for row in reader:
_csv.Error: line contains NULL byte

I did a little digging on stackexchange and fixed the issue by by replacing this line (#29):

reader = csv.reader(args.input_file)

with this:

reader = csv.reader((line.replace('\0','') for line in args.input_file), delimiter=",")

aadm avatar Jul 29 '18 16:07 aadm

Interesting, thanks for reporting @aadm! I will update the code as soon as i have time to test it.

jsphpl avatar Aug 04 '18 17:08 jsphpl