Item8289: KinoSearchContrib misses some dependencies or eval catching code
Priority: Urgent
Current State: Waiting for Release
Released In:
Target Release: n/a
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
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:
- use base, that's bad practice, and is probably documented somewhere
- use SomeOptionalModule - instead, it should try to load them, and disable the XLSX parsing upon failure (maybe with a warning in debug mode)
- not be in DOS mode
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