mrc-convertor-suite - CSV_PP ERROR: 1012 - INI

markmecard
markmecard
Community Member
edited May 31 in Lounge

I have created a CSV file using MS Excell on my MAC mini, M2 Sonoma 14.5.
I set the 1st row to the headers as detailed in the 'README.html' in the downloaded zip file.

When I run the macOSConvertHelper, (which I downloaded from the dropbox link today 31st May 24) I get the following error
# CSV_PP ERROR: 1012 - INI - the header contains an empty field @ rec 1 pos 0
Failed to parse file: /Users/xxxx/Desktop/pm_export.csv
See error hint above.

I have checked the css file and cell A1 contains the first header 'Title'. I have removed extra blank rows and columns, but no effect.

Is this a known error or am I missing something?

regards
Mark


1Password Version: 8.10.33
Extension Version: Not Provided
OS Version: macOS 14.5
Browser: Not Provided

Comments

  • MrC
    MrC
    Volunteer Moderator
    edited May 31

    @markmecard

    Is the Excel export file a UTF-8 CSV export (not an Excel file simply saved with a .csv suffix)?

    That error indicates the header has an empty header field label. Can you show me the header row from the CSV (as a text file, not via Preview)?

  • markmecard
    markmecard
    Community Member

    I double checked and have used the CSV UTF-8 option from Excel for MacOS.

    I duplicated the file and removed the contents and have attached. I could not upload a csv so its a screen shot
    (https://us.v-cdn.net/5020219/uploads/editor/ix/eddzszr4akwx.png "")

    I have dug out my old windows laptop and will try a PC Excel export and MacOS import and also a PC export to PC Import, once the battery has charged.

    regards
    Mark

  • MrC
    MrC
    Volunteer Moderator
    edited June 3

    @markmecard

    Each of the spreadsheet programs has their own set of default CSV export options and overrides for creating a CSV. I can't recall each of them, and I haven't used Excel in ages; Numbers has worked just fine for me. I just manually created on from your header and one data row:

    Title,Licensed to,License Key,Download Link,Registered Email,Version,Tag,Retail Price,Purchase Date,Notes
    "Some title","Joe Smith","5550-343-1111-abc","https:/download.example.com","joe.smith@example.com",2.1a,"A Tag",55.93,"2023-12-02","Some notés for the record"
    

    And this worked perfectly:

    /usr/bin/perl convert.pl csv -dv ~/Desktop/test.csv
    main                : Running convert.pl from '/Users/cappella/Desktop/mrc-converter-suite'
    main                : convert.pl arguments: csv -dv /Users/cappella/Desktop/test.csv
    main                : Loaded generator: MCS::Generators::PUX
    print_fileinfo      : Input file info: "/Users/cappella/Desktop/test.csv"
    print_fileinfo      :     size: 267
    print_fileinfo      :     kind: Unicode text, UTF-8 text
    print_fileinfo      :     mime: text/plain; charset=utf-8
    find_record_type    :       type detected as 'software'
    import              : ROW: 1
    normalize_records   : field: licensed to
    normalize_records   : field: license key
    normalize_records   : field: download link
    normalize_records   : field: registered email
    normalize_records   : field: version
    normalize_records   : field: tag
    normalize_records   : added custom field: software, _software_custom_1, tag, A Tag
    normalize_records   : field: retail price
    normalize_records   : field: purchase date
    print_record        : title: Some title
                          tags:
                          key(order_date): purchase date = 1701504000
                          key(retail_price): retail price = 55.93
                          key(download_link): download link = https:/download.example.com
                          key(reg_email): registered email = joe.smith@example.com
                          key(reg_name): licensed to = Joe Smith
                          key(reg_code): license key = 5550-343-1111-abc
                          key(_software_custom_1): tag = A Tag
                          key(product_version): version = 2.1a
                          notes: Some notés for the record
    Import summary:
        1 item discovered
    Export summary:
    new_item            : Title: Some title
    new_item            :    NOTES:    Some notés for the rrecord
        1 Software License item
        1 total item
    You may now import the file below into 1Password 8:
        /Users/cappella/Desktop/MCS_converted.1pux
    

    I don't have Excel on my laptop, so can't verify the content of the file it exports. Excel on Windows will create a CSV with a BOM (special few byte marker indicating the file's encoding). I don't recall if that macOS version does. You can verify this by using a terminal command. Example:

    hexdump -C ~/Desktop/test.csv| head -1
    00000000  54 69 74 6c 65 2c 4c 69  63 65 6e 73 65 64 20 74  |Title,Licensed t|
    

    This shows the first line of bytes on the file test.csv on my Desktop. It shows there is no BOM in my file.

  • MrC
    MrC
    Volunteer Moderator

    The file utility run against your CSV file will also provide a little more info:

    file ~/Desktop/test.csv
    /Users/cappella/Desktop/test.csv: Unicode text, UTF-8 text
    
  • MrC
    MrC
    Volunteer Moderator

    Hi @markmecard

    Were you able to make any progress here?