WeBWorK Main Forum

APR::Table Error

APR::Table Error

by Louis Zulli -
Number of replies: 1
Our IT folks just updated a bunch of Ubuntu packages on the server that hosts WeBWork. Now I get the following when I submit a number for checking. Help appreciated. 

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • Error in Translator.pm::process_answers: Answer AnSwEr1: |11|
  • Can't locate object method "get" via package "APR::Table" at [WW]/lib/Apache/WeBWorK.pm line 74
    Died within AnswerEvaluator::evaluate called at line 1 of (eval 1942)
  • Error in Translator.pm::process_answers: Answer AnSwEr1:
  • Answer evaluators must return a hash or an AnswerHash type, not type || at /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm line 1174
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 249.
  • Use of uninitialized value $studentAnswer in pattern match (m//) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 250.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 250.
  • Use of uninitialized value $answerScore in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 251.
  • Use of uninitialized value $answerScore in numeric gt (>) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 251.
  • Use of uninitialized value $answerScore in numeric gt (>) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 254.
In reply to Louis Zulli

Re: APR::Table Error

by Louis Zulli -
We seem to have solved this by installing WWSafe.pm and modifying references to Safe.pm as indicated here:

From http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.9

  • There is a bug in Safe.pm version 2.27 which makes it incompatible with WeBWorK. The symptom is that any action involving a MathObject, such as answering a WeBWorK question -- will send the child process serving that request into an infinite loop. Versions of Safe.pm before 2.23 appear to work fine. Safe.pm version 2.29 (the most recent as of this writing) works for most problems but will throw errors on specific WeBWorK problems - particularly ones using graphics.
  • A file labeled WWSafe.pm which is Safe.pm version 2.16 is included with this distribution. At the moment the lines use Safe; have been changed to use WWSafe; in these files
pg/lib/WeBWorK/PG/Translator.pm,
webwork2/lib/WeBWorK/CourseEnvironment.pm,
webwork2/lib/WebworkWebservice/LibraryActions.pm,
webwork2/lib/WebworkWebservice/MathTranslators.pm,
webwork2/lib/WebworkWebservice/RenderProblem.pm,
webwork2/lib/WWSafe.pm
  • (Thanks to Zig Fiedorowicz and Geoff Goehle for research into this problem. Other references: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2292 and http://search.cpan.org/~rgarcia/Safe-2.29/.) Safe.pm is used by WeBWorK to provide a clean namespace for each new problem and to prevent the accidental use of perl commands by webwork question authors that could harm the unix environment. In general it is not considered by the perl monks as a sufficient barrier against determined hacking attempts however it has worked well for us over the last 14 years.

I should have noted that we're running 2.4.7, which we plan to update this summer.