Closed herreio closed 4 years ago
As assumed by @cKlee in #28 it seems to be related to decadic number of records. Beside the example above I am also encountering the issue with the following commands returning numberOfRecords with modulo 10 = 0.
catmandu convert SRU --base http://sru.gbv.de/gjz18 --query pica.zzd=9825228 --recordSchema picaxml --parser picaxml
info:srw/diagnostic/1/61 : First record position out of range at /home/herreio/perl5/lib/perl5/Catmandu/Importer/SRU.pm line 269
catmandu convert SRU --base http://sru.gbv.de/gjz18 --query pica.zzd=3124253 --recordSchema picaxml --parser picaxml
info:srw/diagnostic/1/61 : First record position out of range at /home/herreio/perl5/lib/perl5/Catmandu/Importer/SRU.pm line 269
catmandu convert SRU --base http://sru.gbv.de/gjz18 --query pica.zzd=5308823 --recordSchema picaxml --parser picaxml
info:srw/diagnostic/1/61 : First record position out of range at /home/herreio/perl5/lib/perl5/Catmandu/Importer/SRU.pm line 269
The records however are completely retrieved.
Looks like the current implementation does not stop following requests if startRecord >numberOfRecords
but assumes that SRU implementations will silently return zero records on the last try.
I was able to reproduce the error and to solve it on the dev
branch, not released yet.
perfect, thanks for having a look and fixing it. dev
branch is working fine on my side. looking forward for the release!
With the following command, I just experienced the same issue as mentioned in #28:
All of the 1670 records matching the query are retrieved correctly but in the end a “First record position out of range”-error is thrown:
I am working with Perl version 5.26.1 and Catmandu::Importer::SRU version 0.428.