An error in w1_unittest.test

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

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?

it is the file that was launched by coursera

1 Like

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:

1 Like

thanks

1 Like