[Koha] Problem in importing Patron Records

Elaine Bradtke eb at efdss.org
Fri Nov 23 06:37:00 NZDT 2012


On Thu, Nov 22, 2012 at 6:18 AM, Fischer, Katrin
<Katrin.Fischer at bsz-bw.de> wrote:
> Hi Elaine,
>
> I think it's not the date format that is a problem here. The date format
> should be what you have set in the dateformat system preference.
> I think your problem could be, that you are not providing a borrowernumber.
I am providing a borrower number, and all the fields that are required.

> I found in the past that the import works nicely providing a sequential
> borrowernumber for all my entries in the CSV file.

Our borrower numbers are existing membership numbers.  They have to
be, because one must be a member in order to borrow anything from the
library.  I have no control over these numbers.  We need to retain
this link, because we have to periodically update the borrowers based
on current membership data. I could theoretically move this to another
field, but I've got to be able to overwrite the old data (expiration
dates, old addresses, etc.).
Also maybe try to lower
> case your header row. It's only a guess as I haven't tested it, but maybe it
> makes a difference.

I woke up at 4:30 this morning wondering about that.  Cardbox exports
the header row in upper case.  I'll see if this makes a difference.
>
> Another idea is that you provide a anonymized sample file of your data, so
> we can take a look at the headerrow and 2 or more additional lines to help
> you find the problem.
I could do that.  It's a national holiday today. . . so I'm not
actually working (ha, ha).

I will say having to jump through all these hoops to get the data into
Koha means I probably won't be able to delegate the monthly updates to
another member of staff.  This is unfortunate, it shouldn't be this
difficult.

>
> Hope this helps,
>
> Katrin
>
>
>
>
> -----Original Message-----
> From: koha-bounces at lists.katipo.co.nz on behalf of Elaine Bradtke
> Sent: Wed 21.11.2012 23:51
> To: Quoc Uy
> Cc: koha
> Subject: Re: [Koha] Problem in importing Patron Records
>
> I changed the date format to YYYY-MM-DD
> I also added a date to the patron records that didn't have them.
> I saved it as an ods file, and then closed it opened it and saved it as csv.
> None of these things worked. Same error messages.
>
> Elaine
> On Wed, Nov 21, 2012 at 9:16 PM, Quoc Uy <nguyenquocuy_1102 at yahoo.com>
> wrote:
>> Better give it a try. Do exactly as i say. Maybe change fotmat YYY-MM-DD.
>> Because u have same error as i did.
>>
>>
>> ________________________________
>> From: Elaine Bradtke <eb at efdss.org>
>> To: Uy nguy?n qu?c <nguyenquocuy_1102 at yahoo.com>
>
>> Cc: koha <koha at lists.katipo.co.nz>
>> Sent: Thursday, November 22, 2012 12:06 AM
>> Subject: Re: [Koha] Problem in importing Patron Records
>>
>> I have to set up a system to convert information from our membership
>> list into patron files on a monthly basis to catch expired
>> memberships. I run the file through a database called Cardbox for
>> batch editing. Cardbox exports have never cause any problems with csv
>> formatting before.
>> As an experiment, I ran the Cardbox csv file through (an old version
>> of) excel and exported a new csv file.  But it didn't help, and in
>> fact broke the date formatting (deleting the zero padding).
>>
>> We are using the same date format as is set in our system preferences
>> (dd/mm/yyyy).  For some patrons there is no expiration date (life
>> members). Would this be a problem - are expiration dates required?
>> Must I convert it to yyyy-mm-dd ? (the notes on patron import seem to
>> imply it's OK to use your specified date format).
>> Elaine
>> On Wed, Nov 21, 2012 at 8:36 PM, Uy nguy?n qu?c
>
>> <nguyenquocuy_1102 at yahoo.com> wrote:
>>> So u have the same error as i had. I'm using Koha on Ubuntu. If u try to
>>> open file with excel in windows, then save file as .csv, then import, i
>>> think there is no error more. If u use in ubuntu, or debian, should
>>> follow
>>> what i said before. Open .csv file with Libre Calc (it may ask for
>>> default-
>>> seperated by semicolon and comma, choose those values), then fill it,
>>> save
>>> as .ods file, then open .ods file, save as new .csv file. U can import
>>> this
>>> .csv file. Good luck
>>> On 22 Nov 2012, at 00:30, Elaine Bradtke wrote:
>>>
>>>> Here's what I'm getting (in 3.08.05):
>>>> Feedback:
>>>>
>>>> Parsing upload file Patron upload test2.csv
>>>> Content-Type : application/octet-stream
>>>> Content-Disposition : form-data; name="uploadborrowers";
>>>> filename="Patron upload test2.csv"
>>>> headerrow : CARDNUMBER, SURNAME, FIRSTNAME, TITLE, INITIALS, ADDRESS,
>>>> ADDRESS2, CITY, ZIPCODE, COUNTRY, EMAIL, PHONE, BRANCHCODE,
>>>> CATEGORYCODE, DATEEXPIRY
>>>>
>>>>
>>>> Error analysis:
>>>>
>>>> Line 2 Critical field "surname" missing (borrowernumber: UNDEF; surname:
>>>> UNDEF).
>>>> Line 2 Critical field "branchcode" missing (borrowernumber: UNDEF;
>>>> surname: UNDEF).
>>>> Line 2 Critical field "categorycode" missing (borrowernumber: UNDEF;
>>>> surname: UNDEF).
>>>>
>>>> It's all there.
>>>> Is Koha expecting the fields in a particular order? I'm supplying the
>>>> header row (above). But it's not connecting the two somehow. I have
>>>> tried with and without quotes around the fields, neither seems to
>>>> work.
>>>> Elaine
>>>>
>>>> On Wed, Nov 21, 2012 at 8:22 PM, Elaine Bradtke <eb at efdss.org> wrote:
>>>>> Are you saying there should be quotes around the fields?
>>>>> Because I'm getting similar failures and the fields are there, but
>>>>> it's not seeing them.
>>>>> Elaine
>>>>>
>>>>> On Tue, Nov 20, 2012 at 9:45 PM, Quoc Uy <nguyenquocuy_1102 at yahoo.com>
>>>>> wrote:
>>>>>>    First, i have problem with this, too. I downloaded original file
>>>>>> patron_import.csv, opened it with Libreoffice Calc, watched table
>>>>>> borrowers
>>>>>> in database by Phpmyadmin. Then i tried to fill all file with the
>>>>>> similar
>>>>>> values as what i did before (add patron manual). Next i saved file as
>>>>>> .csv
>>>>>> file, and tried import patron. I failed with message: "Line 2 Critical
>>>>>> field
>>>>>> "surname" missing (borrowernumber: UNDEF; surname: UNDEF)"...
>>>>>>    Next i tried to change fomats all fields in their fomats (text,
>>>>>> number, date), esspecially date YYY-MM-DD. Then i saved file as .csv
>>>>>> file,
>>>>>> and tried import patron. I failed with message: "Line 2 Critical field
>>>>>> "surname" missing (borrowernumber: UNDEF; surname: UNDEF)"... (same
>>>>>> error)
>>>>>>    I saved .csv file as .ods file, and tried import, once more time
>>>>>> fail.
>>>>>>
>>>>>>    Last time, maybe i was lucky, i use that.ods file, saved as .csv
>>>>>> file, then i received a message:
>>>>>>
>>>>>> Export text file...
>>>>>>
>>>>>> field delimiter  ,
>>>>>> text delimiter  "
>>>>>> I press Ok, then saved. And i imported patrons without error.
>>>>>> I don't understand it very clear, but just wanna share experience.
>>>>>> Hope
>>>>>> it can help someone else.
>>>>>> _______________________________________________
>>>>>> Koha mailing list  http://koha-community.org
>>>>>> Koha at lists.katipo.co.nz
>>>>>> http://lists.katipo.co.nz/mailman/listinfo/koha
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Elaine Bradtke
>>>>> Data Wrangler
>>>>> VWML
>>>>> English Folk Dance and Song Society | http://www.efdss.org
>>>>> Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
>>>>> Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance
>>>>> and Song Society in London, England. If you wish to phone me
>>>>> personally, send an e-mail first. I work off site)
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------
>>>>> Registered Company No. 297142
>>>>> Charity Registered in England and Wales No. 305999
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------------
>>>>> "Writing about music is like dancing about architecture"
>>>>> --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
>>>>
>>>>
>>>>
>>>> --
>>>> Elaine Bradtke
>>>> Data Wrangler
>>>> VWML
>>>> English Folk Dance and Song Society | http://www.efdss.org
>>>> Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
>>>> Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance
>>>> and Song Society in London, England. If you wish to phone me
>>>> personally, send an e-mail first. I work off site)
>>>>
>>>>
>>>> --------------------------------------------------------------------------
>>>> Registered Company No. 297142
>>>> Charity Registered in England and Wales No. 305999
>>>>
>>>>
>>>> ---------------------------------------------------------------------------
>>>> "Writing about music is like dancing about architecture"
>>>> --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
>>>
>>
>>
>>
>> --
>> Elaine Bradtke
>> Data Wrangler
>> VWML
>> English Folk Dance and Song Society | http://www.efdss.org
>> Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
>> Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance
>> and Song Society in London, England. If you wish to phone me
>> personally, send an e-mail first. I work off site)
>> --------------------------------------------------------------------------
>> Registered Company No. 297142
>> Charity Registered in England and Wales No. 305999
>>
>> ---------------------------------------------------------------------------
>> "Writing about music is like dancing about architecture"
>> --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
>>
>>
>
>
>
> --
> Elaine Bradtke
> Data Wrangler
> VWML
> English Folk Dance and Song Society | http://www.efdss.org
> Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
> Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance
> and Song Society in London, England. If you wish to phone me
> personally, send an e-mail first. I work off site)
> --------------------------------------------------------------------------
> Registered Company No. 297142
> Charity Registered in England and Wales No. 305999
> ---------------------------------------------------------------------------
> "Writing about music is like dancing about architecture"
> --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>



-- 
Elaine Bradtke
Data Wrangler
VWML
English Folk Dance and Song Society | http://www.efdss.org
Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
Tel    +44 (0) 20 7485 2206 (This number is for the English Folk Dance
and Song Society in London, England. If you wish to phone me
personally, send an e-mail first. I work off site)
--------------------------------------------------------------------------
Registered Company No. 297142
Charity Registered in England and Wales No. 305999
---------------------------------------------------------------------------
"Writing about music is like dancing about architecture"
--Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)


More information about the Koha mailing list