# MethodError using Omniscape

**URL:** <https://discourse.julialang.org/t/methoderror-using-omniscape/134126>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 25, 2025, 11:32pm UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126 "2025-11-25T23:32:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![petebaker](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@petebaker](https://discourse.julialang.org/u/petebaker)\
**Post date:** [November 25, 2025, 11:32pm UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126/1 "2025-11-25T23:32:48Z")

</div>

Hi all,

I’m working on running an analysis in Omniscape, and am battling an error that I will post below. I have run these analyses before without issue. I’m getting this issue even when trying files that worked successfully a few months ago, and on different computers. The resistance, source layers, and .ini file looks fine.

Any help is very much appreciated!

> julia\> run\_omniscape(“chase\_config.ini”)  
> ┌ Warning: Your specified project directory, outputs/chase\_local\_movement, already exists. Writing outputs to outputs/chase\_local\_movement\_2.  
> └ @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\main.jl:155  
> [ Info: Starting up Omniscape with 8 workers and double precision  
> [ Info: Using Circuitscape with the cg+amg solver…  
> [ Info: Calculating block artifact correction array…  
> ERROR: MethodError: no method matching missingarray\_to\_array(::Matrix{Union{Missing, Float64}}, ::Int64)  
> This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
> 
> Closest candidates are:  
> missingarray\_to\_array(::Array{Union{Missing, T}, N} where {N, T\<:Number}, ::Number)  
> @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\utils.jl:614
> 
> Stacktrace:  
> [1] calc\_correction(arguments::Dict{…}, os\_flags::Omniscape.OmniscapeFlags, cs\_cfg::Dict{…}, condition\_layers::Omniscape.ConditionLayers{…}, conditions::Omniscape.Conditions, precision::DataType)  
> @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\utils.jl:471  
> [2] run\_omniscape(cfg::Dict{…}, resistance::Matrix{…}; reclass\_table::Nothing, source\_strength::Matrix{…}, condition1::Nothing, condition2::Nothing, condition1\_future::Nothing, condition2\_future::Nothing, wkt::String, geotransform::Vector{…}, write\_outputs::Bool)  
> @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\main.jl:252  
> [3] run\_omniscape(path::String)  
> @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\main.jl:558  
> [4] top-level scope  
> @ REPL[12]:1  
> Some type information was truncated. Use `show(err)` to see complete types.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [November 26, 2025, 12:08am UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126/2 "2025-11-26T00:08:03Z")

</div>

> [@petebaker](#):
>
> ERROR: MethodError: no method matching missingarray\_to\_array(::Matrix{Union{Missing, Float64}}, ::Int64)  
> This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
> 
> Closest candidates are:  
> missingarray\_to\_array(::Array{Union{Missing, T}, N} where {N, T\<:Number}, ::Number)  
> @ Omniscape C:\Users\peteb.julia\packages\Omniscape\VSLPS\src\utils.jl:614

Odd, that call signature looks like it would dispatch to that method, can you check that file and line for what the method body is?

---

<div class="post-metadata">

**Author:** ![petebaker](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@petebaker](https://discourse.julialang.org/u/petebaker)\
**Post date:** [November 26, 2025, 12:11am UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126/3 "2025-11-26T00:11:39Z")

</div>

Hi Benny,

Sorry I don’t totally know what you mean by that. But here is the .ini file that I’m getting the error on (this just worked perfectly a month ago) if this helps.

> [Input files]  
> resistance\_file=resistance\_map.tif
> 
> [Options]  
> project\_name=outputs/chase\_local\_movement  
> block\_size=13  
> radius=313  
> source\_from\_resistance=true  
> write\_raw\_currmap=true  
> calc\_normalized\_current=true  
> calc\_flow\_potential=true  
> mask\_nodata=true  
> write\_as\_tif=true  
> parallelize=true

---

<div class="post-metadata">

**Author:** ![petebaker](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@petebaker](https://discourse.julialang.org/u/petebaker)\
**Post date:** [November 26, 2025, 12:15am UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126/4 "2025-11-26T00:15:46Z")

</div>

Ah never mind, here is the code from that file at line 614 onwards

> \*`nodata`\*\*: The numeric value with which `missing` values will be replaced in  
> the result.  
> “”"  
> function missingarray\_to\_array(  
> A::MissingArray{T, N} where T \<: Number where N,  
> nodata::Number  
> )  
> output = copy(A)  
> output[ismissing.(output)] .= nodata
> 
> ```
> return convert(Array{typeof(output[1]), ndims(output)}, output)
> 
> ```

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [November 26, 2025, 1:21am UTC](https://discourse.julialang.org/t/methoderror-using-omniscape/134126/5 "2025-11-26T01:21:26Z")

</div>

By all appearances of the stacktrace, that method dispatch should have worked, and that method works on simple inputs when copied and isolated to a different module. There’s an open issue for this, so if you have a Github account you could chime in there as another user. That issue’s commenters say that downgrading to Julia 1.11 works in the meantime, though I can’t imagine how 1.12 made a difference.

[method dispatch error when running forest connectivity example · Issue #160 · Circuitscape/Omniscape.jl](https://github.com/Circuitscape/Omniscape.jl/issues/160)

Just curious, does this run properly for you on 1.12?

```julia-auto
module Blah
const MissingArray{T, N} = Array{Union{Missing, T}, N}
function missingarray_to_array(
        A::MissingArray{T, N} where T <: Number where N,
        nodata::Number
    )
    output = copy(A)
    output[ismissing.(output)] .= nodata

    return convert(Array{typeof(output[1]), ndims(output)}, output)
end
end

Blah.missingarray_to_array([0.1 missing                                                                                                                                                                
                            2.3 missing], -9999)

import Omniscape

Omniscape.missingarray_to_array([0.1 missing                                                                                                                                                                
                                 2.3 missing], -9999)

```
