# Unable to use set\_attribute

**URL:** <https://discourse.julialang.org/t/unable-to-use-set-attribute/96529>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [March 23, 2023, 6:48pm UTC](https://discourse.julialang.org/t/unable-to-use-set-attribute/96529 "2023-03-23T18:48:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilychow233](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@lilychow233](https://discourse.julialang.org/u/lilychow233)\
**Post date:** [March 23, 2023, 6:48pm UTC](https://discourse.julialang.org/t/unable-to-use-set-attribute/96529/1 "2023-03-23T18:48:11Z")

</div>

Hi.

My julia version is 1.8.5. I tried to run the Benders Decomposition example from

> **[Benders decomposition · JuMP](https://jump.dev/JuMP.jl/stable/tutorials/algorithms/benders_decomposition/)**
>
> Documentation for JuMP.

However, issues occured with the Callback Method. Specifically with this line:

```julia
set_attribute(lazy_model, MOI.LazyConstraintCallback(), my_callback)

```

I’m getting “UndefVarError: set\_attribute not defined”.

I went ahead and did some searching, then also tried using “set\_optimizer\_attribute”, but still got the error “LoadError: MathOptInterface.UnsupportedAttribute{MathOptInterface.RawOptimizerAttribute}: Attribute MathOptInterface.RawOptimizerAttribute(”(MOI.LazyConstraintCallback())“) is not supported by the model.”

What’s the cause? Any help is appreciated. Thank you.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 23, 2023, 7:06pm UTC](https://discourse.julialang.org/t/unable-to-use-set-attribute/96529/2 "2023-03-23T19:06:02Z")

</div>

`set_attribute` was introduced in JuMP v1.9.0.

You can change the documentation to match your installed version of JuMP using the box in the bottom left:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/2/825dc2aed3693175d05afe1ace3ed0e511a609ba.png)

Update you packages, otherwise, here’s the link you probably need: [Benders decomposition · JuMP](https://jump.dev/JuMP.jl/v1.8/tutorials/algorithms/benders_decomposition/)
