Importing a CSV file into 1Password 4 fails

Options
smagoon
smagoon
Community Member

I created a small test file (Test6.csv)
cat -e Test6.csv
"title","location","name","password","note"^M$
wich I tried to import into 1Password4 as a CSV and I get the following
0 items imported / 0 items failed.
I have tried tried with and without the CR, with and without the quotes and with different data to no avail. I'm running 1Password 4.3 (430017) on OS X 10.9.4. Any insight here would be greatly appreciated.

Comments

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @smagoon. You'll need version 4.3.1 or higher. There is a bug in earlier versions, preventing CSV importing.

    If you are importing from another wallet program, there might be a converter to help you.

  • sjk
    sjk
    1Password Alumni
    Options

    Hi @smagoon,

    A CSV import bug in 1Password 4.3 that @MrC mentioned was quickly resolved in 4.3.1.BETA-1, back in April. You may want to be keeping 1Password updated; they've been quite a few bug fixes and other changes between 4.3 and the current version 4.4.1. :)

    @MrC's data converters are awesome and totally worth checking out if, as he says, data you'd like to import with 1Password 4 is coming from another wallet program.

  • smagoon
    smagoon
    Community Member
    Options

    Well I feel silly. That fixed it. Thanks guys.

  • Glad to hear everything is fixed up, @smagoon‌!

  • treville
    treville
    Community Member
    Options

    Having a similar problem but I have 4.4.1. I've match data format, encoding and CRLF to a sample file exported from 1P4. Any other suggestions?

  • MrC
    MrC
    Volunteer Moderator
    Options

    Make sure you have a look how to import from CSV. When you export as CSV from 1P4 to use as a sample file (to import), you'll need to be sure that the CSV only has the type of cards (i.e. login, creditcard, ...) and that you select that type of import from the pulldown in the Import dialog.

  • sjk
    sjk
    1Password Alumni
    Options

    Hi @treville,

    I hope @MrC's suggestion helped you get properly formatted CSV data for importing with 1Password 4.

    What is the origin of data that you're trying to import? Maybe you're able to make use of @MrC's awesome data converters, mentioned earlier in this discussion?

    PS:

    A related notable quote of a quote from Michael Tsai - Blog - Writing a CSV Parser

    Thomas Burette

    If a supplied CSV is arbitrary, the only real way to make sure the data is correct is for an user to check it and eventually specify the delimiter, quoting rule,... Barring that you may end up with a error or worse silently corrupted data.

    Writing CSV code that works with files out there in the real world is a difficult task. The rabbit hole goes deep. Ruby CSV library is 2321 lines.

    On the surface, it seems like almost a one-liner.

  • treville
    treville
    Community Member
    Options

    I was already using the link provided by @MrC without success. I'm coming from a text file (I was using a password protected OneNote page, pasted into Excel, exported to CSV, now using TextWrangler to edit). I have been trying to use just "title","location","username","password","notes" (just pasted it from the actual file). I changed the line breaks to Unix (LF) and encoding to Unicode (UTF-8) which finally got me an error. Prior to that, 1P4 I didn't produce any message after clicking open. Now at least, I get "0 items imported/0 items failed".

  • MrC
    MrC
    Volunteer Moderator
    Options

    If you can wait until tomorrow, I'll write up a CSV tester for you. You'll give it a CSV file, and tell it what type of card type the CSV contains. It will then inform you if the CSV is valid and likely to be imported by 1P4.

  • sjk
    sjk
    1Password Alumni
    edited September 2014
    Options

    Hi @treville,

    Sorry to hear the CSV importing is still giving you trouble. There's some additional information in this newer guide that might be helpful:

    Importing data

    I'd suggest using CRLF instead of LF line breaks in your CSV data, even though the latter should work. Another thing to try is jump importing a few lines to help isolate whether it's a general or more specific issue.

    If you're still stuck after that we're still here to help you get it working …

    Edit: Or wait 'til tomorrow for @MrC's generous offer to write you a CSV tester. :)

  • treville
    treville
    Community Member
    Options

    Just tried first couple of lines with CRLF and it works. Tried the whole thing and it failed. Must be a data issue. I'll do some cleanup on the list it until all goes in. Not ideal but OK. Thanks for the help.

  • sjk
    sjk
    1Password Alumni
    Options

    Hi @treville,

    Good to hear you've made some progress!

    Sometimes a "divide and conquer" strategy can be used to isolate problems with the input file. For instance, as you've already done, first try importing just the first few lines of the file. If that fails it may be a general issue. If it succeeds, like it did for you, then try importing half of the input file. If failure, then half of that. Etc.

This discussion has been closed.