## Forum archive 2000-2006

### Thomas Hagedorn - Error Message: Argument "" isn't numeric in addition

by Arnold Pizer -
Number of replies: 0
 Error Message: Argument "" isn't numeric in addition topic started 8/30/2005; 7:25:15 PMlast post 8/31/2005; 8:57:06 AM
 Thomas Hagedorn - Error Message: Argument "" isn't numeric in addition  8/30/2005; 7:25:15 PM (reads: 476, responses: 5) In one of our classes, we're getting the following error for one of our students on all her problems. No other students seem to be affected and the problems work fine for everyone. But this students gets a pink screen and an error message with each of her problems. The error message is: Argument "" isn't numeric in addition (+) at /local/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm line 293. We're running Webwork 2.1.3 - epsilon. -Tom <| Post or View Comments |>

 Michael Gage - Re: Error Message: Argument  8/30/2005; 7:48:20 PM (reads: 522, responses: 0) As an off-the-top-of-my-head guess -- check the open/due/answer dates for this student. If they are not defined you could get this kind of message -- although it's not clear how they would become undefined or corrupted. I probably have a slightly different file than you do -- there is nothing at ProblemSets.pm line 293 which would cause this problem. At line 283 there is a formatDateTime call which might generate an error like this. Let us know what you find out. -- Mike <| Post or View Comments |>

 Thomas Hagedorn - Re: Error Message: Argument  8/30/2005; 10:19:00 PM (reads: 519, responses: 0) Hi Mike, Thanks for the suggestion. By overriding the course due dates for that student with the same dates, I was able to make the error disappear for that student. However, two more students have just emailed me with the same error on different problems (We had our first assignment given out today). Here's the specific details on those students. We get the same error message for lines 155, 977 of /local/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm We are running the CVS version 1.170 of Problem.pm We also get the same error message for line 359 of /local/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm We running CVS version 1.61 of ProblemSet.pm. For both of those files, the relevant code seems to be my $attempts =$problem->num_correct + \$problem->num_incorrect; so it looks like somehow that num_correct or num_incorrect isn't being set. At least, that's my guess. -Tom ps. We are running Webwork 2.1.3 (no epsilon as in the last post) <| Post or View Comments |>

 John Jones - Re: Error Message: Argument  8/30/2005; 10:43:23 PM (reads: 530, responses: 0) I think the problem is connected to the database. If I login to mysql as root ("mysql -uroot -p" and then give the password at the prompt), then "use webwork;" (to access sql_single courses), and then show tables like "%_problem_user"; to see a list of problem-user tables, and then select distinct num_correct, num_incorrect from Zhu_MAT_210_Fall_2005_problem_user; to pick one, I get +-------------+---------------+| num_correct | num_incorrect |+-------------+---------------+| 0 | 0 || 1 | 0 || 2 | 0 || 1 | 1 || 1 | 5 || 1 | 9 || 0 | 2 || 0 | 3 || 1 | 17 || 1 | 4 || 1 | 3 || 0 | 1 || 1 | 2 || 0 | 4 || 3 | 0 |+-------------+---------------+ This course has no empty fields. So, I think that having a blank or undefined (which gets turned into a blank) in the database for either of these two values is the source of the error. So, the first thing to do would be to try to emulate this (if you are using sql_single, it might be just a matter of entering your course name). John <| Post or View Comments |>

 Thomas Hagedorn - Re: Error Message: Argument  8/30/2005; 10:47:20 PM (reads: 507, responses: 0) Follow-up. I went to see whether changing the due dates would make a difference. At the screen Instructor Tools/Homework_sets_Editor/Set_Detail for set xxx I typed in "User Values" for the dates when the problem set "Opens", "Answers Due", and "Answers Available". I also checked the boxes to the left of those choices. When I clicked "Save Changes", the screen comes back with my values only in the "Opens" Window. The other two windows then default back to the 12/31/1969 at 07:00pm EST default time. Any ideas? -Tom -Tom <| Post or View Comments |>

 Michael Gage - Re: Error Message: Argument  8/31/2005; 8:57:06 AM (reads: 529, responses: 0) Sounds like a bug, but I can't duplicate it here using version 1.20 of ProblemSetDetail.pm I think you may have an earlier version of this file: Here is a report from the CVS Revision 1.13.2.2 / (view) - annotate - [select for diffs] , Fri Jan 28 00:29:02 2005 UTC (7 months ago) by sh002i Branch: rel-2-1-patches Changes since 1.13.2.1: +33 -26 lines Diff to previous 1.13.2.1 to branch point 1.13HEAD backport: Fixed minor display problem where empty (not-overriden)date values were being displayed as 12/31/1969 (toenail) That sounds like your date problem. The other problem is arising because something isn't correctly initialized in the database. In this case the number of attempts. Does the warning disappear after the student answers a question? I would expect it to since the data in the database would now be filled in. If it doesn't then something more complicated is going on. I don't know for sure why the number of attempts wasn't properly initialized. I haven't been able to reproduce it yet. --Mike <| Post or View Comments |>