BRO_OK
October 21, 2023, 4:26am
1
i keep getting this error when i run the test
TypeError Traceback (most recent call last)
Cell In [26], line 1
----> 1 w1_unittest.test_dLdOmega_of_omega_array(dLdOmega_of_omega_array)
File ~/work/w1_unittest.py:342, in test_dLdOmega_of_omega_array(target_dLdOmega_of_omega_array)
318 test_cases = [
319 {
320 “name”: “default_check”,
(…)
338 },
339 ]
341 for test_case in test_cases:
→ 342 result = target_dLdOmega_of_omega_array(
343 test_case[“input”][“omega_array”],
344 test_case[“input”][“pA”],
345 test_case[“input”][“pB”])
347 try:
348 assert result.shape == test_case[“expected”][“shape”]
TypeError: dLdOmega_of_omega_array() takes 1 positional argument but 3 were given
1 Like
TMosh
October 21, 2023, 5:11am
2
I believe you are either using an obsolete copy of the notebook file, or you have an obsolete copy of the w1_unittest.py file.
Both of these files were updated a few weeks ago.
Can I ask where you got your assignment files from?
BRO_OK
October 21, 2023, 3:17pm
3
it is the file that was launched by coursera
1 Like
TMosh
October 21, 2023, 4:07pm
4
That’s odd, perhaps the notebook update process did not work on your account for some reason.
I think the problem can be fixed by updating your notebook and the unittest python file. Instructions are in the course FAQ here:
TOPIC 1a HOW TO GET A FRESH OR LATEST VERSION OF A NOTEBOOK
These steps are tried and tested
Click file, then select open. You will find all the files related to the assignment. Here if you have saved a copy of your notebook with renaming other than what was mentioned. Then go ahead and delete the assignment notebook by selecting the particular notebook.
Once deleted, you will find 404 not found image on your browser. Then close the browser.
Open the assignment page again, …
1 Like