mrc-converter-suite unexpected failure parsing CSV
Hello,
I try to improvise my data from enpass and get the following error.
cd '/Users/eric/Desktop/mrc-converter-suite' && /usr/bin/perl convert.pl enpass '/Users/eric/Desktop/pm_export.json' -v Unexpected failure parsing CSV: row 2 at /Users/eric/Desktop/mrc-converter-suite/./Converters/Enpass.pm line 796. Imported 1 item Exported 1 note item Exported 1 total item You may now import the file /Users/eric/Desktop/1P_import.1pif into 1Password
would be happy about help :)
mrc-converter-suite-2021-12-22-1225
Enpass 6.8.0 (1056)
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: macOS 12.3.1
Comments
-
Hello @neolidas ,
Your export file's name is pm_export.json, but the converter is detecting that the contents is CSV, and trying to parse it as such. Can you confirm which format you selected when you exported - CSV or JSON?
You should export using the JSON format for Enpass 6 and above, since it is more robust.
If you did export to the JSON format, then the converter is incorrectly determining the format, for your data.
The converter can be run directly, without using the helper app. Open the terminal, and run the commands below. You can copy / paste each command:
cd ~/Desktop/mrc-converter-suite perl convert.pl enpass -d -v ../pm_export.json | grep print_fileinfo
This will output four diagnostic lines similar to :
print_fileinfo : Input file info: "../pm_export.json" print_fileinfo : size: 14523 print_fileinfo : kind: JSON data print_fileinfo : mime: application/json; charset=utf-8
These indicate the format of the export file.
0 -
Hello,
thanks for the quick feedback.
I have exported the files as json.
print_fileinfo : Input file info: "../pm_export.json" print_fileinfo : size: 13120282 print_fileinfo : kind: Unicode text, UTF-8 text Unexpected failure parsing CSV: row 2 at /Users/eric/Desktop/mrc-converter-suite/./Converters/Enpass.pm line 796. print_fileinfo : mime: text/plain; charset=utf-8
0 -
The converter is expecting a JSON export file to have a
{
as the first character, and a}
as its last character. Example:{ stuff inside... }
But the "kind" part of the diagnostic is indicating that the data is not detected as JSON (and this would result in the problem you see, since the fallback would be CSV). Did you happen to open / edit this file with some other program?
0 -
Sorry about the troubles here, @neolidas .
I'll have to install the latest Enpass and see if I can replicate this issue. But I won't be able to get to that until morning (it's after 1am now).
I was going to ask you to confirm that the export was from macOS, but the dialog above confirms that!
It might be a good idea to delete your export for now, so that it doesn't sit on your Desktop unencrypted.
0 -
Hello @MrC ,
I have now tried it with enpass portable 6.6.1 (789).
there was this error
print_fileinfo : Input file info: "../pm_export.json" print_fileinfo : size: 13120280 print_fileinfo : kind: Unicode text, UTF-8 text Uncaught exception from user code: garbage after JSON object, at character offset 12676303 (before "+hWXbV09spGmR85ev+c8...") at /Users/eric/Desktop/mrc-converter-suite/./Converters/Enpass.pm line 646. JSON::PP::decode_error("garbage after JSON object") called at /Users/eric/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 708 JSON::PP::PP_decode_json(JSON::PP=HASH(0x138567f70), "{\x{a} \"folders\": [\x{a} {\x{a} \"icon\": \"1008\",\x{a} "..., 0) called at /Users/eric/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 148 JSON::PP::decode(JSON::PP=HASH(0x138567f70), "{\x{a} \"folders\": [\x{a} {\x{a} \"icon\": \"1008\",\x{a} "...) called at /Users/eric/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 110 JSON::PP::decode_json("{\x{a} \"folders\": [\x{a} {\x{a} \"icon\": \"1008\",\x{a} "...) called at /Users/eric/Desktop/mrc-converter-suite/./Converters/Enpass.pm line 646 Converters::Enpass::process_json(SCALAR(0x137df1ce8), HASH(0x137df1cd0), undef) called at /Users/eric/Desktop/mrc-converter-suite/./Converters/Enpass.pm line 591 Converters::Enpass::do_import("../pm_export.json", undef) called at convert.pl line 183 print_fileinfo : mime: text/plain; charset=utf-8
i found a code snippet with { brackets } in my notes, i deleted it and re-exported and converted again.
this is the output
print_fileinfo : Input file info: "../pm_export.json" print_fileinfo : size: 12671297 print_fileinfo : kind: Unicode text, UTF-8 text print_fileinfo : mime: text/plain; charset=utf-8
now the import into 1password worked and maybe this information will help others.
thanks for your help
0 -
Hello @neolidas
I was able to replicate the issue. It appears some (recent?) change to Enpass is adding newlines to the end of the JSON export file.
I've updated the converter suite to resolve this. Let me know if this works out !
$ cd ~/Desktop/mrc-converter-suite/ $ perl convert.pl enpass -v ../enpass_export.json Imported 4 items (1 item expanded to 2 items) Exported 1 note item Exported 3 login items Exported 1 creditcard item Exported 5 total items You may now import the file /home/MrC/Desktop/1P_import.1pif into 1Password $
0