Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item8289: KinoSearchContrib misses some dependencies or eval catching code

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Waiting for Release Extension KinoSearchContrib Main.AndrewJones, Main.OlivierRaginel
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/Iconv.pm in @INC (@INC contains: ...) at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/XLSX.pm line 20.
BEGIN failed--compilation aborted at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/XLSX.pm line 20.
Compilation failed in require at (eval 40) line 3.
 at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable.pm line 28
Couldn't require Foswiki::Contrib::KinoSearchContrib::StringifierPlugins::XLS : Can't locate Unicode/Map.pm in @INC (@INC contains: ...) at /usr/local/lib/perl5/site_perl/5.8.8/Spreadsheet/ParseExcel/FmtUnicode.pm line 10.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/Spreadsheet/ParseExcel/FmtUnicode.pm line 10.
Compilation failed in require at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/XLS.pm line 20.
BEGIN failed--compilation aborted at .../lib/Foswiki/Contrib/KinoSearchContrib/StringifierPlugins/XLS.pm line 20.
Compilation failed in require at (eval 41) line 3.
 at /usr/local/lib/perl5/site_perl/5.8.8/Module/Pluggable.pm 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/CharsetDetector.pm 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 XLSX.pm 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:
BEGIN {
    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
Codebase
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 Foswikirev:6558
TargetRelease n/a
ReleasedIn
Topic revision: r6 - 27 Feb 2010, WillNorris
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License