Type Error: cannot unpack non-iterable Nonetype object

Im at section 2.6 of the Practice Lab under the heading:
“Now let’s run the gradient descent algorithm above to learn the parameters for our dataset”
and I am getting an error that says:

TypeError Traceback (most recent call last)
7 alpha = 0.01
----> 9 w,b,, = gradient_descent(x_train ,y_train, initial_w, initial_b, compute_cost, compute_gradient, alpha, iterations)
11 print(“w,b found by gradient descent:”, w, b)

in gradient_descent(x, y, w_in, b_in, cost_function, gradient_function, alpha, num_iters)
15 # Calculate the gradient and update the parameters
—> 16 dj_dw, dj_db = gradient_function(x, y, w, b )
18 # Update Parameters using w, b, alpha and gradient

TypeError: cannot unpack non-iterable NoneType object

Not sure what to do at this point…
Any thoughts?

There is an error in your gradient_function() regarding some variable that has the value of “None”.