Re: [Koha] OAI-PMH Set Question

2017-11-23 Thread Pedro Amorim
Hello Alphie,

That database error is expected (I think) because the script will always
attempt to insert the records matching your mappings, regardless or already
being in the set or not, unless you run with the -r *reset* flag.

So just so I'm understanding correctly in the future, when will I need to
run build_oai_sets.pl? Is it anytime I create a new set or anytime I load
new records into Koha? Or is it both?

Look for *OAI-PMH:AutoUpdateSets* syspref and enable it. I haven't tested
this but it seems to me it' what you're looking for.
What I'd do is I'd update a biblio record after enabling the syspref and
check if it's working, i.e. the record matching the mapping would
automatically be inserted in the set.

Have a good one,

Pedro Amorim

On 22 November 2017 at 23:24, Alphie Garcia  wrote:

> Thanks, Mark. It gave me a different set of errors this time, but testing
> the sets in OAI, I see that the records are now displaying which is great.
>
> On the errors:
>
> Running perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl in
> koha-shell gave me a 100 of these SQL errors:
>
> DBD::mysql::st execute failed: Duplicate entry '100-3' for key 'PRIMARY'
> [for Statement "
> INSERT INTO oai_sets_biblios (set_id, biblionumber)
> VALUES (?,?)
> " with ParamValues: 0='3', 1='100'] at /usr/share/koha/lib/C4/OAI/
> Sets.pm
> line 597.
>
> Again, the records seem to be populating when I look at the OAI output so I
> guess it's good?
>
> So just so I'm understanding correctly in the future, when will I need to
> run build_oai_sets.pl? Is it anytime I create a new set or anytime I load
> new records into Koha? Or is it both?
>
>
>
> On Wed, Nov 22, 2017 at 1:01 PM, Mark Alexander  wrote:
>
> > Excerpts from Alphie Garcia's message of 2017-11-22 09:56:03 -1000:
> > > When I'm in Linux and type:
> > >
> > > perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl
> > >
> > >
> > > I get the following error:
> > >
> > > Can't locate C4/Context.pm in @INC (you may need to install the
> > C4::Context
> > > module) (@INC contains: /etc/perl
> >
> > Try running this command first:
> >
> >   koha-shell INSTANCE
> >
> > where INSTANCE is the name of your Koha instance.  That should set up
> > the environment so that the build_oai_sets.pl script will run correctly.
> >
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] OAI-PMH Set Question

2017-11-22 Thread Alphie Garcia
Thanks, Mark. It gave me a different set of errors this time, but testing
the sets in OAI, I see that the records are now displaying which is great.

On the errors:

Running perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl in
koha-shell gave me a 100 of these SQL errors:

DBD::mysql::st execute failed: Duplicate entry '100-3' for key 'PRIMARY'
[for Statement "
INSERT INTO oai_sets_biblios (set_id, biblionumber)
VALUES (?,?)
" with ParamValues: 0='3', 1='100'] at /usr/share/koha/lib/C4/OAI/Sets.pm
line 597.

Again, the records seem to be populating when I look at the OAI output so I
guess it's good?

So just so I'm understanding correctly in the future, when will I need to
run build_oai_sets.pl? Is it anytime I create a new set or anytime I load
new records into Koha? Or is it both?



On Wed, Nov 22, 2017 at 1:01 PM, Mark Alexander  wrote:

> Excerpts from Alphie Garcia's message of 2017-11-22 09:56:03 -1000:
> > When I'm in Linux and type:
> >
> > perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl
> >
> >
> > I get the following error:
> >
> > Can't locate C4/Context.pm in @INC (you may need to install the
> C4::Context
> > module) (@INC contains: /etc/perl
>
> Try running this command first:
>
>   koha-shell INSTANCE
>
> where INSTANCE is the name of your Koha instance.  That should set up
> the environment so that the build_oai_sets.pl script will run correctly.
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] OAI-PMH Set Question

2017-11-22 Thread Mark Alexander
Excerpts from Alphie Garcia's message of 2017-11-22 09:56:03 -1000:
> When I'm in Linux and type:
> 
> perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl
> 
> 
> I get the following error:
> 
> Can't locate C4/Context.pm in @INC (you may need to install the C4::Context
> module) (@INC contains: /etc/perl

Try running this command first:

  koha-shell INSTANCE

where INSTANCE is the name of your Koha instance.  That should set up
the environment so that the build_oai_sets.pl script will run correctly.
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] OAI-PMH Set Question

2017-11-22 Thread Alphie Garcia
Apologies for the late reply, Pedro. I think this is where my newness is
showing because I hadn't run the build_oai_sets.pl but I'm having trouble
getting it to actually execute.

When I'm in Linux and type:

perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl


I get the following error:

Can't locate C4/Context.pm in @INC (you may need to install the C4::Context
module) (@INC contains: /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2
/usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20
/usr/local/lib/site_perl .) at /usr/share/koha/bin/migration_tools/
build_oai_sets.pl line 45.
BEGIN failed--compilation aborted at /usr/share/koha/bin/migration_tools/
build_oai_sets.pl line 45.

Does this imply that I didn't install Koha properly? I'm not sure how to
troubleshoot beyond this point.

*__*

*Alphie Garcia | *Information Resources and Collection Management Librarian
 | University of Hawai'i - West O'ahu Library *| *91-1001 Farrington Hwy.,

Kapolei, HI 96707* |* Tel:* (808) 689-2708 *| Email:* alp...@hawaii.edu
 | **Subscribe for the * *latest
Library news* 

On Wed, Nov 8, 2017 at 1:11 AM, Pedro Amorim  wrote:

> Hey Alphie,
>
> Just to make sure, did you run build_oai_sets.pl after you created the
> set + mapping?
> /usr/share/koha/bin/migration_tools/build_oai_sets.pl
>
> Regards,
>
> Pedro Amorim
>
> On 8 November 2017 at 00:42, Alphie Garcia  wrote:
>
>> Hi, everyone,
>>
>> I'm a bit of a Koha newbie so I hope this is the appropriate place to send
>> this question.
>>
>> I am trying to set up an OAI-PMH set in Koha that looks in the 949 field,
>> $a for OUWKanopy. This info is definitely in the MARC records I've
>> uploaded
>> but for whatever reason, I get an error from Koha saying the set is empty.
>> To make things stranger: Koha accepts a set I created where I have it
>> looking in a custom 909 field $a field I set up, again looking for
>> OUWKanopy. When I run this set, it seems to pull data fine.
>>
>> Am I missing something here as to why data can be pulled from one set and
>> not the other?
>>
>> Thanks in advance for your help,
>> ___
>> Koha mailing list  http://koha-community.org
>> Koha@lists.katipo.co.nz
>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] OAI-PMH Set Question

2017-11-08 Thread Pedro Amorim
Hey Alphie,

Just to make sure, did you run build_oai_sets.pl after you created the set
+ mapping?
/usr/share/koha/bin/migration_tools/build_oai_sets.pl

Regards,

Pedro Amorim

On 8 November 2017 at 00:42, Alphie Garcia  wrote:

> Hi, everyone,
>
> I'm a bit of a Koha newbie so I hope this is the appropriate place to send
> this question.
>
> I am trying to set up an OAI-PMH set in Koha that looks in the 949 field,
> $a for OUWKanopy. This info is definitely in the MARC records I've uploaded
> but for whatever reason, I get an error from Koha saying the set is empty.
> To make things stranger: Koha accepts a set I created where I have it
> looking in a custom 909 field $a field I set up, again looking for
> OUWKanopy. When I run this set, it seems to pull data fine.
>
> Am I missing something here as to why data can be pulled from one set and
> not the other?
>
> Thanks in advance for your help,
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] OAI-PMH Set Question

2017-11-07 Thread Alphie Garcia
Hi, everyone,

I'm a bit of a Koha newbie so I hope this is the appropriate place to send
this question.

I am trying to set up an OAI-PMH set in Koha that looks in the 949 field,
$a for OUWKanopy. This info is definitely in the MARC records I've uploaded
but for whatever reason, I get an error from Koha saying the set is empty.
To make things stranger: Koha accepts a set I created where I have it
looking in a custom 909 field $a field I set up, again looking for
OUWKanopy. When I run this set, it seems to pull data fine.

Am I missing something here as to why data can be pulled from one set and
not the other?

Thanks in advance for your help,
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha