• Resolved dumplinglife

    (@dumplinglife)


    I tried to add bulk. I checked the “use CSV header”. After I choose my file and click “upload”, it says “undefined column: barcode”.
    I used a test csv file. This is the entire file:

    “barcode”,”title”,”author”,”description”,”thumburl”,”publisher”,”media”,”type”,”category”,”keywords”,”subject”
    “1234”,”qwer”,”qwer”,”qwer”,””,”qwer”,”qwer”,”Book”,”qwer”,””,”qwer”

    The Field Separate Character and Enclosure Character are both correct.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Robert Heller

    (@robertpheller)

    I just uploaded your test CSV file into my WebLibrarian test site and it uploaded just fine. I just copied and pasted from my E-Mail. I wonder if there is a “funny” character in your file.

    Thread Starter dumplinglife

    (@dumplinglife)

    What text editor are you using? I just copy-pasted it into Notepad and saved it as a CSV file. Now it says:

    Undefined column: ?“barcode”
    Undefined column: ”title”
    Undefined column: ”author”
    Undefined column: ”description”
    Undefined column: ”thumburl”
    Undefined column: ”publisher”
    Undefined column: ”media”
    Undefined column: ”type”
    Undefined column: ”category”
    Undefined column: ”keywords”
    Undefined column: ”subject”
    Some mandatory columns are missing!

    Thread Starter dumplinglife

    (@dumplinglife)

    Also, what character encoding do I need? I think the problem is my character encoding on the quotation marks and commas.

    Plugin Author Robert Heller

    (@robertpheller)

    I just used cat (Linux command line program). I use a MicroEmacs under Linux:

    gollum.deepsoft.com% rpm -qi me-jasspa-nox-20091011-1
    Name : me-jasspa-nox Relocations: /usr
    Version : 20091011 Vendor: (none)
    Release : 1 Build Date: Mon 12 Oct 2009 05:22:26 AM EDT
    Install Date: Tue 12 May 2015 08:59:28 AM EDT Build Host: xyon
    Group : Applications/Editors Source RPM: me-jasspa-20091011-1.src.rpm
    Size : 731394 License: GPLv2
    Signature : (none)
    Packager : Jon Green <[email protected]>
    URL : https://www.jasspa.com/
    Summary : JASSPA MicroEmacs Console
    Description :
    The console version of JASSPA MircoEmacs an enhanced version of Daniel
    Lawrence’s original MicroEmacs 3.8. It has a small memory and disk footprint
    while still providing most of the useful Emacs functionality. MicroEmacs includes
    an integrated spell-checker, macro language, major modes for most languages,
    color syntax highlighting in X and console modes, online help, file browser,
    and much more!

    (I don’t know if there is a MS-Windows version — I’ve only ever used it under
    Linux.)

    Well these all have UTF-8 quote characters (in my E-Mail). I don’t know
    if this is Notepad or your mail client doing that. I’m *guessing* it is
    Notepad *or* Excel, since the WebLibrarian is compaining and it does not add
    its own quote marks in its messages. *DON’T* use UTF-8 quote characters, use
    *ASCII* quote characters. Best not to use quote characters, unless you need
    to. And then make sure they are *ASCII* quote characters.

    Plugin Author Robert Heller

    (@robertpheller)

    The quotes and commas *must* be ASCII. It is possible for *some* of the fields to have UTF-8 (eg random text fields: titles, authors, keywords, subject, description), but the barcodes have to be ASCII.

    Thread Starter dumplinglife

    (@dumplinglife)

    My quotes and commas are ASCII. My quotes have code 034 and my commas have code 044 when converted to Unicode.

    Thread Starter dumplinglife

    (@dumplinglife)

    also, should I surround the values in my header with quotes?

    i.e., should it be this: “barcode”,”title”, …

    or should it be: barcode,title, …

    Plugin Author Robert Heller

    (@robertpheller)

    I don’t think it matters if things are quoted, but I suspect your problem has something to do with the quote marks or maybe there is an extra character in the file. All I can suggest it to examine the file with a dumb text editor. If the quotes and commas are proper ASCII and there are no extrainious characters (partitularly non-printable ones), it should work. In the message with many “Undefined column:” messages, there is a strange character. I don’t know if that was a copy-paste snafu or something else.

    Thread Starter dumplinglife

    (@dumplinglife)

    I’m using notepad to edit the file.

    Also, where is the strange character (in the message with many “Undefined column:” messages)? I don’t see it.

    Plugin Author Robert Heller

    (@robertpheller)

    Just in front of the quote mark in “barcode”. Here is an hexdump of a copy-paste I did to MicroEmacs. I don’t know if this was a copy-paste snafu or not:

    gollum.deepsoft.com% hexdump -C /scratch/temp.out
    00000000 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c 75 6d 6e |Undefined column|
    00000010 3a 20 ef bb bf e2 80 9c 62 61 72 63 6f 64 65 e2 |: ……barcode.|
    00000020 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c |…Undefined col|
    00000030 75 6d 6e 3a 20 e2 80 9d 74 69 74 6c 65 e2 80 9d |umn: …title…|
    00000040 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c 75 6d |.Undefined colum|
    00000050 6e 3a 20 e2 80 9d 61 75 74 68 6f 72 e2 80 9d 0a |n: …author….|
    00000060 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c 75 6d 6e |Undefined column|
    00000070 3a 20 e2 80 9d 64 65 73 63 72 69 70 74 69 6f 6e |: …description|
    00000080 e2 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f |….Undefined co|
    00000090 6c 75 6d 6e 3a 20 e2 80 9d 74 68 75 6d 62 75 72 |lumn: …thumbur|
    000000a0 6c e2 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 |l….Undefined c|
    000000b0 6f 6c 75 6d 6e 3a 20 e2 80 9d 70 75 62 6c 69 73 |olumn: …publis|
    000000c0 68 65 72 e2 80 9d 0a 55 6e 64 65 66 69 6e 65 64 |her….Undefined|
    000000d0 20 63 6f 6c 75 6d 6e 3a 20 e2 80 9d 6d 65 64 69 | column: …medi|
    000000e0 61 e2 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 |a….Undefined c|
    000000f0 6f 6c 75 6d 6e 3a 20 e2 80 9d 74 79 70 65 e2 80 |olumn: …type..|
    00000100 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c 75 |..Undefined colu|
    00000110 6d 6e 3a 20 e2 80 9d 63 61 74 65 67 6f 72 79 e2 |mn: …category.|
    00000120 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f 6c |…Undefined col|
    00000130 75 6d 6e 3a 20 e2 80 9d 6b 65 79 77 6f 72 64 73 |umn: …keywords|
    00000140 e2 80 9d 0a 55 6e 64 65 66 69 6e 65 64 20 63 6f |….Undefined co|
    00000150 6c 75 6d 6e 3a 20 e2 80 9d 73 75 62 6a 65 63 74 |lumn: …subject|
    00000160 e2 80 9d 0a |….|
    00000164

    Thread Starter dumplinglife

    (@dumplinglife)

    That appears to be the issue. I removed those weird characters with a hex editor and it worked.

    Thank you! You can mark this as resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Undefined column: “barcode”’ is closed to new replies.