[Koha] patron categories [bulkmarcimport]

Eric Lease Morgan eric_morgan at infomotions.com
Sat Jul 5 07:58:47 NZST 2014


On Jul 4, 2014, at 3:16 PM, Eric Lease Morgan <eric_morgan at infomotions.com> wrote:

>>>  $ bulkmarcimport.pl -file /tmp/pamphlets.marc
>>> 
>>> And for each record in pamphlets.marc I get the following error:
>>> 
>>>  .DBD::mysql::st execute failed: Field 'marcxml' doesn't have a
>>>  default value at /usr/local/koha/lib/C4/Biblio.pm line 3222,
>>>  <GEN15> line 1465.
>>>  ERROR in _koha_add_biblioitem INSERT INTO biblioitems SET
>> 
>> Looks like you have an incomplete/broken DB schema. Have you already populated sensitive data? Otherwise i'd drop the database, create an empty one, and use the webinstaller to create the correct one.
> 
> Maybe I can initialize my koha database by hand?


I tried populating my database with many .sql files found in installer/data/mysql. Examples included but were not limited to:

  * mysql -uroot -p koha < kohastructure.sql
  * mysql -uroot -p koha < sysprefs.sql
  * mysql -uroot -p koha < en/mandatory/auth_values.sql
  * ...

I then reconnected via the Web interface, and was prompted to do installation, again. (Bummer). It seemed to import things, again, but with the same errors as before, plus a few more about duplicate values. After this I was still not able to create patron profiles, etc.

I then tried to import the sample z39.50 servers:

  $ mysql -uroot -p koha < sample_z3950_servers.sql

And I got this error:

  ERROR 1364 (HY000) at line 1: Field 'description' doesn't have a default value

I then hacked sample_z3950_servers.sql to add a description field and look like this:

  INSERT INTO z3950servers
  (description,host, port, db, userid, password, name, checked, rank, syntax, encoding,recordtype) VALUES 
  ('foobar', 'lx2.loc.gov',210,'LCDB','','','LIBRARY OF CONGRESS',1,1,'USMARC','utf8','biblio’);

I then imported the sample z3950 file, again. Next, using the Web interface, I was (successfully) able to search the Library of Congress. After identifying a record of interest, I tried to import it, but failed miserably because there were a whole bunch of fields missing. I was finally stymied when I could not select a value in Tab #9 for "Koha [default] item type”. 

I’m not giving up!

—
Eric Lease Morgan






More information about the Koha mailing list