Item8289: KinoSearchContrib misses some dependencies or eval catching code

Priority: Urgent
Current State: Waiting for Release
Released In:
Target Release: n/a
Applies To: Extension
Component: KinoSearchContrib
Reported By: OlivierRaginel
Waiting For: Main.AndrewJones, Main.OlivierRaginel
Last Change By: WillNorris
Tried AndrewJones port, and it runs great, but has some glitches:
# sudo -u www ./kinoindex
Couldn't require Foswiki::Contrib::KinoSearchContrib::StringifierPlugins::XLSX : Can't locate Text/ in @INC (@INC contains: ...) at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/ line 20.
BEGIN failed--compilation aborted at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/ line 20.
Compilation failed in require at (eval 40) line 3.
 at /usr/local/lib/perl5/site_perl/5.8.8/Module/ line 28
Couldn't require Foswiki::Contrib::KinoSearchContrib::StringifierPlugins::XLS : Can't locate Unicode/ in @INC (@INC contains: ...) at /usr/local/lib/perl5/site_perl/5.8.8/Spreadsheet/ParseExcel/ line 10.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/Spreadsheet/ParseExcel/ line 10.
Compilation failed in require at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/ line 20.
BEGIN failed--compilation aborted at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/ line 20.
Compilation failed in require at (eval 41) line 3.
 at /usr/local/lib/perl5/site_perl/5.8.8/Module/ line 28
KinoSearch index files init
- to suppress all normal output: kinoindex -q
Use of uninitialized value in numeric ne (!=) at /usr/local/lib/perl5/site_perl/5.8.8/ line 8289, <$in> line 377.

Therefore it seems to crash before indexing all webs. Will try to look into it myself, but needed some place to keep track of errors and fixes.

-- OlivierRaginel - 25 Sep 2009

It should still index correctly, just not .xlsx files.

-- AndrewJones - 25 Sep 2009

You missed the last line then smile

But I've fixed it by upgrading KinoSearch to the latest version (I think, did a lot of other things like installing Text::Iconv and Unicode::Map.

Anyway, the shouldn't:
  1. use base, that's bad practice, and is probably documented somewhere
  2. use SomeOptionalModule - instead, it should try to load them, and disable the XLSX parsing upon failure (maybe with a warning in debug mode)
  3. not be in DOS mode smile

But yeah, you're right, I should just have not asked to index XLSX anyway.

But even if I comment .xslx from the config, it still tries to load the .pm, so it doesn't help.

Did a quick & dirty fix for now, like:
    eval { require Spreadsheet::XLSX; };
    return 0 if $@; # Disabled until somebody fixes this loading
#use Spreadsheet::XLSX;

-- OlivierRaginel - 25 Sep 2009

I also got bitten by missing Unicode::Map dependency today as well.

-- PaulHarvey - 29 Sep 2009

i had already added CPAN:Text::Iconv to DEPENDENCIES. now i'm adding CPAN:Unicode::Map.

i filed Item8634 to make the indexer more fault tolerant.

-- WillNorris - 26 Feb 2010

ItemTemplate edit

Summary KinoSearchContrib misses some dependencies or eval catching code
ReportedBy OlivierRaginel
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component KinoSearchContrib
Priority Urgent
CurrentState Waiting for Release
WaitingFor AndrewJones, OlivierRaginel
Checkins KinoSearchContrib:e3ccf78dcef4
TargetRelease n/a
Topic revision: r6 - 27 Feb 2010, WillNorris - This page was cached on 15 Jan 2020 - 01:22.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy