Error Message when converting/importing from Chrome
Hi - I'm new to 1password and am trying to import my Chrome logins. I've followed the various steps in this article: https://github.com/AgileBits/onepassword-utilities/tree/master/convert_to_1p4
Having exported my keychain logins, I've dragged the exported file onto the AppleScript_Conversion_Helper file, which brings up a terminal box with a message saying:
Odd number of elements in hash assignment at Converters/Keychain.pm line 146 (#1)
(W misc) You specified an odd number of elements to initialize a hash,
which is odd, because hashes come in key/value pairs
A 1P_import.1pif file is created, but if I try to import it into 1Password I get an error message saying 'Could not read items from file. Check import format'.
Any advice?
1Password Version: 6.2.1
Extension Version: Not Provided
OS Version: OS X 10.11.4
Sync Type: Not Provided
Comments
-
Greetings @minoglio,
Due to the error you're seeing the
1P_import.1pif
file is zero bytes in size. At a guess the file is opened prior to the conversion starting and when the script crashes we still have the zero byte file as a leftover.Now the scripts you found were actually created by an amazing fellow who goes by MrC here. He finds enjoyment from helping out lots of people by creating these scripts so they can move their data from all sorts of locations to 1Password. What I found was the version in out GitHub repository is the last stable version (1.08) but MrC does have a slightly newer version which he has titled Testing Bits and is version 1.09. That version didn't show the same error message and it created a proper 1Password Interchange Format (.1pif) file for me. I could link you directly to the file but it seems more appropriate to link you to his thread here in our forums. It can be found at MrC's Convert to 1Password Utility. He's also amazingly responsive to queries. We've been working on improving our ability to import but for an OS X keychain his convertors are the way to go :smile:
0 -
Hi @minoglio,
You are using version 1.08 of the script, and I've since resolved an issue with the keychain converter (and your error diagnostic is compatible with the problem* I resolved). You'll want the 1.09 version in Testing Bits (see the first post in the converter suite). See if that helps.
* The issues is that some keychain entries could have an extra line I wasn't aware of, and the 1.09 version handles this case.
0 -
You've cracked it! Thanks MrC and littlebobbytables.
0 -
-
First off, @MrC thank you for all the hard work. I once had to write a huge perl script and I know just how difficult managing a project like this can be.
So much so that I feel bad having to ask this question... I too am having the same problem, but while trying to convert my OS X Keychain to 1Password format. I downloaded 1.0.9 and I clicked "Allow" on every entry by hand to assure it wasn't an Apple Scripting problem. However, I am still getting the following output:
Odd number of elements in hash assignment at Converters/Keychain.pm line 146 (#1)
(W misc) You specified an odd number of elements to initialize a hash,
which is odd, because hashes come in key/value pairs.
Use of uninitialized value in list assignment at Converters/Keychain.pm line
146 (#2)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell you
the name of the variable (if any) that was undefined. In some cases
it cannot do this, so it also tells you what operation you used the
undefined value in. Note, however, that perl optimizes your program
anid the operation displayed in the warning may not necessarily appear
literally in your program. For example, "that $foo" is usually
optimized into "that " . $foo, and the warning will refer to the
concatenation (.) operator, even though there is no . in
your program.
Examined 398 items
Skipped 398 non-login items
Skipped 0 duplicate items
Imported 0 items
Exported 0 total itemsI am using OS X 10.11.4 and currently have XCode 7.3 installed.
Any suggestions?
0 -
You were absolutely right. I had moved the folder from my desktop to the trashcan, but hadn't emptied the trashcan. In terminal, I had done a "pwd" and confirmed I was in the right directory, but it was the OLD directory.
1.0.9 worked like a charm!
You need a paypal "beer fund" so I can donate.
0 -
@boduke ,
Thanks for the nice words, and gesture.
On the technical side, as an FYI, your Terminal, more specifically, its shell process, had the old directory still open (since its working directory was set to the 1.08 directory). Had you emptied the trash, the files inside would have been deleted, and then of course any attempt to run the commands would have failed. The deletion of the directory itself could not have occurred, even when you empty the trash, until after the last open file descriptor is closed, and the close cannot take place while it is in use by your shell (a non-zero reference count on the directory node). A simple change of directory higher in the tree would then allow the reference count to decrease.
0