WeBWorK Main Forum

Webwork error Can't call method "flags" on an undefined value

Webwork error Can't call method "flags" on an undefined value

by Paul Vojta -
Number of replies: 2
Dear all:

I've been getting the following error message on problem sets:
[Tue Sep 09 23:37:58 2014] [error] [client 71.131.176.39] [/webwork2/Math-1A-Lect-1-Fa14/hw4444/] Can't call method "flags" on an undefined value at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm line 358.\n * in WeBWorK::ContentGenerator::ProblemSet::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm\n * in WeBWorK::Template::template called at line 530 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm\n * in WeBWorK::ContentGenerator::content called at line 202 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm\n * in WeBWorK::ContentGenerator::go called at line 370 of /opt/webwork/webwork2/lib/WeBWorK.pm, referer: https://webwork.math.berkeley.edu/webwork2/Math-1A-Lect-1-Fa14/?user=8315&effectiveUser=8315&key=TgN7gYRRZ5UjYEJfyY08R0rMj97zhbFR&displayMode=&showOldAnswers=
This is with webwork 2.8, running on some kind of (not recent) RH-based VM.
Authentication is via LTIBasic, falling back to CAS (both are used).
With one course on that machine, it happens to every assignment we create eventually, and then never goes away for that assignment. With a different course on the same machine (with a different instructor), it has never occurred.
I tried deleting and re-creating the course, but the problem persists.
I am at wit's end. Any ideas?
In reply to Paul Vojta

Re: Webwork error Can't call method "flags" on an undefined value

by Paul Vojta -
A correction to the previous post. The problem does not occur with every assignment we create. It has never occurred with assignment 0, for example, which was assigned to all students and which essentially all of them worked on.
The difference seems to have been that with that assignment (which was imported from the file templates/set0.def that comes with newly created courses), no problems were deleted. In all other tests (until very recently) we always deleted problems.
However, in a recent experiment, three homework sets were created (via import). In one of the problem sets, problems were deleted; in the other two, none were deleted. The first one eventually showed the bug, but the other two are still OK.
Also (just to clarify) the bug doesn't show up immediately. It shows up after a few hours (and then never goes away). The class is a large lecture with roughly 400 students.
However, I also created some assignments in a separate "course" that I use only for testing, using the same methods as in the actual affected course. Those assignments are still unaffected. So whatever event is causing this seems to depend on students logging in to the relevant course.
In reply to Paul Vojta

Re: Webwork error Can't call method "flags" on an undefined value

by Paul Vojta -
Problem solved.

I upgraded to the tag WeBWorK-2.8+ (from WeBWorK-2.8), and the problem went away.