# Error using Agents.jl

**URL:** <https://discourse.julialang.org/t/error-using-agents-jl/37314>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [April 10, 2020, 4:03am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314 "2020-04-10T04:03:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [April 10, 2020, 4:03am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/1 "2020-04-10T04:03:08Z")

</div>

I am trying to simulate the example that is published in the documentation of `Agents.jl` - Continuous Space Social Distancing for COVID 19. Despite installing the required packages, I still get the following error,

```julia
ERROR: LoadError: UndefVarError: ContinuousSpace not defined
Stacktrace:
 [1] motion(; speed::Float64) at /Users/narayanivedam/Dropbox/Research/Simulations/Julia/2020_Final/COVID_TRIAL.jl:11
 [2] motion() at /Users/narayanivedam/Dropbox/Research/Simulations/Julia/2020_Final/COVID_TRIAL.jl:11
 [3] top-level scope at /Users/narayanivedam/Dropbox/Research/Simulations/Julia/2020_Final/COVID_TRIAL.jl:25
 [4] include(::String) at ./client.jl:439
 [5] top-level scope at none:0
in expression starting at /Users/narayanivedam/Dropbox/Research/Simulations/Julia/2020_Final/COVID_TRIAL.jl:25

```

How do I fix this ?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [April 10, 2020, 4:41am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/2 "2020-04-10T04:41:41Z")

</div>

Have you tried using the `master` branch of the package?

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [April 10, 2020, 4:43am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/3 "2020-04-10T04:43:07Z")

</div>

I use Julia version 1.4. How do I ensure that the package I use is the one in the `master` branch?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [April 10, 2020, 4:44am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/4 "2020-04-10T04:44:42Z")

</div>

`] add Agents#master`

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [April 10, 2020, 4:50am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/5 "2020-04-10T04:50:47Z")

</div>

I get the following error

```julia
    Cloning git-repo `https://github.com/JuliaDynamics/Agents.jl.git`
   Updating git-repo `https://github.com/JuliaDynamics/Agents.jl.git`
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AgentsPlots [7820620d]:
 AgentsPlots [7820620d] log:
 ├─possible versions are: [0.1.0-0.1.2, 0.2.0-0.2.1] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.2, 0.2.0-0.2.1]
 └─restricted by compatibility requirements with Agents [46ada45e] to versions: uninstalled — no versions left
   └─Agents [46ada45e] log:
     ├─possible versions are: 3.0.0 or uninstalled
     └─Agents [46ada45e] is fixed to version 3.0.0

```

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [April 10, 2020, 4:54am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/6 "2020-04-10T04:54:32Z")

</div>

Maybe you should raise an issue on the repo. I believe they are working on a new version and it looks like maybe things got a bit out of sync?

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [April 10, 2020, 6:38am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/7 "2020-04-10T06:38:19Z")

</div>

> [@dpsanders](#):
>
> I believe they are working on a new version

Yes, this is the problem. We are nearly done with a big v3 upgrade - this is introducing breaking changes in both Agents and AgentsPlots. To run the latest examples you’ll need to use the master version of both packages.

```julia
]add Agents#master
]add AgentsPlots#master

```

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 10, 2020, 9:39am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/8 "2020-04-10T09:39:25Z")

</div>

@ennvvy I can not find `ContinuousSpace` anywhere in the **stable** documentation: [Introduction · Agents.jl](https://juliadynamics.github.io/Agents.jl/stable/)

You are probably reading the master documentation. In this scenario, the fact that we are in a transition period to version 3.0 is irrelevant. The master version of the docs **always corresponds to the master version of the packages**. This is not an issue in my eyes, but a fact, and it holds for other repositories as well. (Notice also that the very first message in the documentation “Latest news” tells you to do that as well)

So, for the future, if you are reading the master version of the docs of a package, be sure to also have the master version installed; it will save you confusion! 🙂

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [April 10, 2020, 11:24am UTC](https://discourse.julialang.org/t/error-using-agents-jl/37314/9 "2020-04-10T11:24:38Z")

</div>

> [@Libbum](#):
>
> ]add Agents#master

Thanks, That fixed it.
