# Saving Decisiontree model using JLD and Load issue.

**URL:** https://discourse.julialang.org/t/saving-decisiontree-model-using-jld-and-load-issue/22840
**Category:** General Usage
**Created:** [April 6, 2019, 1:53pm UTC](https://discourse.julialang.org/t/saving-decisiontree-model-using-jld-and-load-issue/22840 "2019-04-06T13:53:51Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [April 6, 2019, 3:17pm UTC](https://discourse.julialang.org/t/saving-decisiontree-model-using-jld-and-load-issue/22840/2 "2019-04-06T15:17:04Z")

</div>

You need to have the types available. Eg here, `using Random`.

Also, please [quote your code](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530). And you may also want to consider JLD2, it is somewhat better maintained (but has the same constraint about types).

---

_[View the full topic](https://discourse.julialang.org/t/saving-decisiontree-model-using-jld-and-load-issue/22840)._
