Error in assemble_vector

Hi all,

I am using dolfinx and I am having some problems with the interpretation of an error.
I have a variable named stress_Actuator, which is defined as follows:

weight_vector_function = Function(Y).sub(0)
with weight_vector_function.vector.localForm() as loc:
    loc.set(U_val)

stress_Actuator = weighted_stress(u, p, Re, weight_vector_function, n, ds_ChannelOutlet)

The variable type is:

print(type(stress_Actuator))

class 'ufl.form.Form'

and if I print it, I get:

print(stress_Actuator)

((({ A | A_{i_{121}, i_{122}} = -1 * ({ A | A_{i_{119}, i_{120}} = I[i_{119}, i_{120}] * ph })[i_{121}, i_{122}] }) + ({ A | A_{i_{117}, i_{118}} = (({ A | A_{i_{115}, i_{116}} = ({ A | A_{i_{113}, i_{114}} = 0.3333333333333333 * I[i_{113}, i_{114}] })[i_{115}, i_{116}] * (div(uh)) }) + (nabla_grad(uh)))[i_{117}, i_{118}] / 5000 })) . (n)) . (f_33-0) } * ds(<Mesh #0>[3], {})
{ ((({ A | A_{i_{131}, i_{132}} = -1 * ({ A | A_{i_{129}, i_{130}} = I[i_{129}, i_{130}] * ph })[i_{131}, i_{132}] }) + ({ A | A_{i_{127}, i_{128}} = (({ A | A_{i_{125}, i_{126}} = ({ A | A_{i_{123}, i_{124}} = 0.3333333333333333 * I[i_{123}, i_{124}] })[i_{125}, i_{126}] * (div(uh)) }) + (nabla_grad(uh)))[i_{127}, i_{128}] / 5000 })) . (n)) . (f_35-0) } * ds(<Mesh #0>[3], {})

However, when I try to use assemble_vector, assemble_vector(stress_Actuator), I get the following error:

Does anyone know what is the meaning of this error?
I have not included the full code as it is quite long, but if you need more information I can provide it.

Many thanks.

Have you compiled the ufl form, i.e.

dolfinx.fem.form(stress_Actuator)

without a minimal code reproducing the error it is hard to give any further guidance.