System error

error:  Can't take log of 0 at /mnt/rest/home/turner/Dropbox/perl/anime/html/rating.html line 22.
context: 
... 
18:  GROUP BY series.id
19:  EOSQL
20:  $sth->execute( $series );
21:  my( $title, $rating, $stddev, $reviews ) = $sth->fetchrow_array;
22:  my $bestbet =
23:  $rating -
24:  $stddev +
25:  ( log($reviews) / log(5) );
26: 
... 
code stack:  /mnt/rest/home/turner/Dropbox/perl/anime/html/rating.html:22
/mnt/rest/home/turner/Dropbox/perl/anime/html/autohandler:102
raw error






























Can't take log of 0 at /mnt/rest/home/turner/Dropbox/perl/anime/html/rating.html line 22.


Trace begun at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Can\'t take log of 0 at /mnt/rest/home/turner/Dropbox/perl/anime/html/rating.html line 22.^J') called at /mnt/rest/home/turner/Dropbox/perl/anime/html/rating.html line 22
HTML::Mason::Commands::__ANON__('vars', 'HASH(0xae913a0)', 'tdir', '/themes/default', 'path_info', '', 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xaeac110)', 'vars', 'HASH(0xae913a0)', 'tdir', '/themes/default', 'path_info', '', 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 1302
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'vars', 'HASH(0xae913a0)', 'tdir', '/themes/default', 'path_info', '', 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 1355
HTML::Mason::Request::scomp('HTML::Mason::Request::CGI=HASH(0xb01e3d0)', 'HTML::Mason::Component::FileBased=HASH(0xaeac110)', 'vars', 'HASH(0xae913a0)', 'tdir', '/themes/default', 'path_info', '', 'show', 50, 'series', 1704) called at /mnt/rest/home/turner/Dropbox/perl/anime/html/autohandler line 102
HTML::Mason::Commands::__ANON__('show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xae91960)', 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 1300
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 481
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 481
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::CGI=HASH(0xb01e3d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/CGIHandler.pm line 179
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/CGIHandler.pm line 179
HTML::Mason::Request::CGI::exec('HTML::Mason::Request::CGI=HASH(0xb01e3d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/Interp.pm line 342
HTML::Mason::Interp::exec(undef, undef, 'show', 50, 'series', 1704) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/CGIHandler.pm line 110
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTML/Mason/CGIHandler.pm line 110
HTML::Mason::CGIHandler::_handler('HTML::Mason::CGIHandler=HASH(0xae38600)', 'HASH(0xaf90780)') called at /usr/local/bin/mason-http line 219
eval {...} at /usr/local/bin/mason-http line 217
HTTP::MasonServer::handle_request('HTTP::MasonServer=HASH(0x9d55360)', 'CGI=HASH(0xaf904c0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/Simple/CGI.pm line 154
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/Simple/CGI.pm line 154
HTTP::Server::Simple::CGI::handler('HTTP::MasonServer=HASH(0x9d55360)') called at /usr/local/bin/mason-http line 188
HTTP::MasonServer::handler('HTTP::MasonServer=HASH(0x9d55360)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/Simple.pm line 402
HTTP::Server::Simple::__ANON__('HTTP::MasonServer::NetServer0=HASH(0xae385d0)', 'Net::Server::Proto::TCP=GLOB(0xaf90890)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server.pm line 74
Net::Server::run_client_connection('HTTP::MasonServer::NetServer0=HASH(0xae385d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 229
eval {...} at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 229
Net::Server::PreFork::run_child('HTTP::MasonServer::NetServer0=HASH(0xae385d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 187
Net::Server::PreFork::run_n_children('HTTP::MasonServer::NetServer0=HASH(0xae385d0)', 1) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 382
Net::Server::PreFork::coordinate_children('HTTP::MasonServer::NetServer0=HASH(0xae385d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 331
Net::Server::PreFork::run_parent('HTTP::MasonServer::NetServer0=HASH(0xae385d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server/PreFork.pm line 113
Net::Server::PreFork::loop('HTTP::MasonServer::NetServer0=HASH(0xae385d0)') called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/Net/Server.pm line 60
Net::Server::run('HTTP::MasonServer::NetServer0', 'port', 8000) called at /opt/perl5/perls/perl-5.20.1/lib/site_perl/5.20.1/HTTP/Server/Simple.pm line 271
HTTP::Server::Simple::run('HTTP::MasonServer=HASH(0x9d55360)') called at /usr/local/bin/mason-http line 83
HTTP::MasonServer::run('HTTP::MasonServer=HASH(0x9d55360)') called at /usr/local/bin/mason-http line 358