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

CSV format compatibility problem #4

Closed
wayou opened this issue Sep 29, 2018 · 5 comments
Closed

CSV format compatibility problem #4

wayou opened this issue Sep 29, 2018 · 5 comments

Comments

@wayou
Copy link

wayou commented Sep 29, 2018

Not working with the chrome exported csv which with the following foramt:

name,url,username,password

the import action prints fails with message below:

$ ffpass import --from my_chrome_pswds.csv
Traceback (most recent call last):
  File "/usr/local/bin/ffpass", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/ffpass/__init__.py", line 292, in main
    args.func(args)
  File "/usr/local/lib/python3.7/site-packages/ffpass/__init__.py", line 251, in main_import
    logins = readCSV(args.from_file)
  File "/usr/local/lib/python3.7/site-packages/ffpass/__init__.py", line 161, in readCSV
    logins.append((rawURL(row['url']),
KeyError: 'url'

However, I managed to import by modifying the format:

  • remove the header line
  • remove the name column for each entry
@louisabraham
Copy link
Owner

louisabraham commented Sep 29, 2018

How did you export the passwords from Google Chrome ?

As specified in the usage:

imports a CSV with columns `url,username,password` (order insensitive)

I thought Chrome exports without name. Are you sure it works when removing the header line?

@wayou
Copy link
Author

wayou commented Sep 29, 2018

I export chrome passwords from the dropdown menu in the setting page chrome://settings/passwords
screen shot 2018-09-29 at 22 33 40

Didn't see the usage information. I have a quick look the README and thought it work with plain chrome exported data. 😄

@louisabraham
Copy link
Owner

louisabraham commented Sep 29, 2018

Yes, normally it works with the data exported from chrome. Even if you add columns.

It worked with the file I exported from Chrome.

Could you produce a minimal example?

Something like

name,url,username,password
fake,http://fake.com,fake,fake

@wayou
Copy link
Author

wayou commented Sep 30, 2018

My bad. Cannot reproduce now. Only if I remove the header line the error coccus.
I though it might be that I removed the header from the exported data before. 😅

Thanks for the great tool.

@wayou wayou closed this as completed Sep 30, 2018
@louisabraham
Copy link
Owner

louisabraham commented Sep 30, 2018

Yes, it needs the headers.
On the other hand, even if you permute or add columns it still works.

I'm glad it helped you!

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

2 participants