An element of the Jacobian is not finite or NaN

I have been trying to code for the first time in Dynare. However I am getting this error message. Please help.
STEADY: The Jacobian contains Inf or NaN. The problem arises from:

STEADY: Derivative of Equation 1 with respect to Variable c (initial value of c: 0)
STEADY: Derivative of Equation 8 with respect to Variable z (initial value of z: 1)
STEADY: Derivative of Equation 2 with respect to Variable k (initial value of k: 0)
STEADY: Derivative of Equation 5 with respect to Variable k (initial value of k: 0)
STEADY: Derivative of Equation 6 with respect to Variable k (initial value of k: 0)
STEADY: Derivative of Equation 8 with respect to Variable k (initial value of k: 0)
STEADY: Derivative of Equation 5 with respect to Variable i (initial value of i: 0)
STEADY: Derivative of Equation 8 with respect to Variable i (initial value of i: 0)
STEADY: Derivative of Equation 7 with respect to Variable r (initial value of r: 1.0101)
STEADY: Derivative of Equation 8 with respect to Variable q (initial value of q: 1)

STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.
Error using dynare_solve (line 60)
An element of the Jacobian is not finite or NaN
Error in evaluate_steady_state (line 66)
[ys,check] = dynare_solve([M.fname 'static’],…
Error in steady
(line 54)
[steady_state,params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in SOE3 (line 207)
steady;
Error in dynare (line 180)
evalin(‘base’,fname) ;
SOE3.mod (1.62 KB)

i have the same problem,i also do not know how to fix it.

The problem was that in the initval block k is used before it is defined/set.

hi,professor jpfeifer
thanks for your reponse,so how to handle with the var k?

Your model may be different. So please provide the file. My reply referred to @azeem’s file.