UnboundLocalError Traceback (most recent call last)
in ()
1 ### test cell ex1 - do not modify this test cell
----> 2 get_sub_volume_test(get_sub_volume)
Thank you for following community guidelines. Also the reason I told you to share your error because error might look similar but reason for your error output might not be same to other who have got same error type.
You are incorrectly recalling codes for
#change in dimension of X
#change in dimension of y
as you use the transpose function you are suppose to mention the axis and not use value dimension x, y and z.
Please don’t post code here, it is against community guidelines, rather share what error it still threw
also when you send codes in DM or post an error here, a better choice is to share a screenshot rather than copy paste as some of the syntax error gets missed out with copy paste.
There is probably more error to lookout for if you continue to get error
i keep getting this error:
"AssertionError Traceback (most recent call last)
in ()
1 ### test cell ex1 - do not modify this test cell
----> 2 get_sub_volume_test(get_sub_volume)
~/work/W3A1/test_utils.py in multiple_test_get_sub_volume(test_cases, target)
160 print(‘\033[92m’, success," Tests passed")
161 print(‘\033[91m’, len(test_cases) - success, " Tests failed")
→ 162 raise AssertionError(“Not all tests were passed for {}. Check your equations and avoid using global variables inside the function.”.format(target.name))
163
164 return learner_func_answer
AssertionError: Not all tests were passed for get_sub_volume. Check your equations and avoid using global variables inside the function."
I was also wondering if there is an option to grade the assignment if all the other tests are passed, just this first one missing one. I tried but it says grade 0% even though everything else has passed
Always create new post rather than commenting on an older thread.
Your error is telling in one of the function you are using global variable instead of local variables, i.e. you are suppose to call the variable for that particular grade cell according to call arguments assigned.
You can DM me codes. Click on my name and then message.