http://www.perlmonks.org?node_id=900577


in reply to Re^4: add_chart_ext does not work when compressed
in thread add_chart_ext does not work when compressed

That was my first thought too but in that case there should be a different error message like this:
Couldn't open .\charts\run_chart.bin in add_chart_ext(): No such file or directory.

The particular error message that is being reported, "Chart type 'External' not supported in add_chart()" is generated when you try to add a chart type that doesn't exist via add_chart() (and not from add_chart_ext() as report by the OP):

my $chart = $workbook->add_chart( type => 'foo' ); ... Chart type 'Foo' not supported in add_chart()
However, there is an 'External' chart module (albeit invalid in this case) so if a program inadvertently tried to load it it would generate another different error message. As such I cannot see any way that particular error message can be generated.

Confused? I am and I wrote the module. Hopefully the stack trace will clear things up a bit.

Update: I was wrong about this. The External.pm module is loaded using the same factory method as the other Chart modules. I was clearly smoking a bit too much Java at the time I wrote it.

--
John.

Replies are listed 'Best First'.
Re^6: add_chart_ext does not work when compressed
by Anonymous Monk on Apr 22, 2011 at 05:36 UTC
    However, there is an 'External' chart module (albeit invalid in this case) so if a program inadvertently tried to load it it would generate another different error message. As such I cannot see any way that particular error message can be generated.

    Confused? I am and I wrote the module. Hopefully the stack trace will clear things up a bit.

    Yup. It probably means Spreadsheet/WriteExcel/Chart/External.pm was not copied/packed by cava for whatever reason

      Hello again,

      Sorry for my late reply, I'm rather busy at the moment. Anyhow, below is the error message I receive after inluding Devel::SimpleTrace. I'm not able to judge whether this makes things more clear or not but hopefully you are.

      Chart type 'External' not supported in add_chart() at Spreadsheet::WriteExcel::Chart::factory(unknown source) at Spreadsheet::WriteExcel::Workbook::add_chart_ext(Spreadsheet/Wr +iteExcel/Workbook.pm:560) at analyse_step::generate_report_excel(cavaexecscript/analyse_step +.pm:679) at main::save_report(cavaexecscript/csct.pl:1011) at main::__ANON__(cavaexecscript/csct.pl:376) at <eval>(Tkx.pm:343) at Tkx::i::DoOneEvent(Tkx.pm:343) at Tkx::MainLoop(Tkx.pm:56) at <eval>(cavaexecscript/csct.pl:707) at Cava::Pack::Code::_run_packaged_script(<Packaged Modules>/Appli +cation::Loader:1456) at Cava::Pack::Code::_run_doscript(<Packaged Modules>/Application: +:Loader:1483) at main::(<Packaged Modules>/Application::Loader:1523) Chart type 'External' not supported in add_chart() at Spreadsheet::WriteExcel::Chart::factory(unknown source) at Spreadsheet::WriteExcel::Workbook::add_chart_ext(Spreadsheet/Wr +iteExcel/Workbook.pm:560) at analyse_step::generate_report_excel(cavaexecscript/analyse_step +.pm:679) at main::save_report(cavaexecscript/csct.pl:1011) at main::__ANON__(cavaexecscript/csct.pl:376) at <eval>(Tkx.pm:343) at Tkx::i::DoOneEvent(Tkx.pm:343) at Tkx::MainLoop(Tkx.pm:56) at <eval>(cavaexecscript/csct.pl:707) at Cava::Pack::Code::_run_packaged_script(<Packaged Modules>/Appli +cation::Loader:1456) at Cava::Pack::Code::_run_doscript(<Packaged Modules>/Application: +:Loader:1483) at main::(<Packaged Modules>/Application::Loader:1523) while executing "::perl::CODE(0x30239ec)" invoked from within ".n.f3.l3.b2 invoke " invoked from within ".n.f3.l3.b2 instate {pressed !disabled} { .n.f3.l3.b2 state !pressed; + .n.f3.l3.b2 invoke } " (command bound to event)

      I would very much appreciate if you have any ideas on how to fix this issue! Thanks!

        I'm not able to judge whether this makes things more clear or not but hopefully you are.

        It doesn't help at all. Do you have packed Spreadsheet/WriteExcel/Chart/External.pm ?