RunestoneInteractive / RunestoneServer

Interactive books for computer science and mathematics
http://runestoneinteractive.org
Other
575 stars 503 forks source link

Some problems not working when added to an Assignment #2026

Closed psmaker closed 1 year ago

psmaker commented 1 year ago

What Course are you in LHSIntroCS_2022

What Page were you on Assignment page for my "Unit 9 Problem Set - Part 1" https://runestone.academy/runestone/assignments/doAssignment?assignment_id=112015 (not sure if this helps but it is page I'm on)

What is your username lhsadmin

Describe the bug I have this assignment that is made of some ex??? problems from the book and some customized lhs??? problem that I have made. The ex??? problems all seem to give this error message when running a program. The lhs??? run just fine.

The example below is for ex_8_5.

image
bnmnetp commented 1 year ago

I'm seeing that the questions from that assignment are:

+---------+
| name    |
|---------|
| ex_8_5  |
| ex_8_7  |
| ex_8_11 |
| ex_8_19 |
| lhs_9_1 |
| lhs_9_2 |
| lhs_9_3 |
| lhs_9_7 |
| lhs_9_4 |
| lhs_9_5 |
| lhs_9_6 |
| lhs_9_8 |
+---------+

And the course is based on thinkcspy.

First question: Please open up the javascript console and let me know about anything that might be helpful.

psmaker commented 1 year ago

Yes, that is the correct assignment.

Here is the javascript console where I pressed Save/Run.

image

running {"div_id":"ex_8_5","code":"def reverse(astring):\n return(\"hi\")\n\nprint(reverse('hi'))\n\n","language":"python","errinfo":"SyntaxError: bad input on line 12","to_save":"False","prefix":"","suffix":"\nfrom unittest.gui import TestCaseGui\n\nclass myTests(TestCaseGui):\n\ndef testOne(self):\n self.assertEqual(reverse(\"happy\"),\"yppah\",\"Tested reverse on input of 'happy'\")\n self.assertEqual(reverse(\"Python\"),\"nohtyP\",\"Tested reverse on input of 'Python'\")\n self.assertEqual(reverse(\"\"),\"\",\"Tested reverse on input of ''\")\n\n\n\n\nmyTests().main()\n","partner":"","course":"LHSIntroCS_2022","clientLoginStatus":true,"timezoneoffset":8}

bnmnetp commented 1 year ago

Thanks! I see the problem. Indentation was removed/lost. Git blame says it was back in May that those lines were last changed. I've restored the indentation and will rebuild thinkcspy shortly.

bnmnetp commented 1 year ago

Should be good now.

psmaker commented 1 year ago

Awesome - it works now - thanks!

bnmnetp commented 1 year ago

I'm going to blame VSCode. I recall that I had added a bunch of unittests that someone had sent me. And VSCode seems to fail a lot to properly indent stuff when adding it to RST. I was probably in too much of a hurry and assumed that it was working...