Circuitscape / Omniscape.jl

Functions to compute omnidirectional landscape connectivity using circuit theory and the Omniscape algorithm.
https://docs.circuitscape.org/Omniscape.jl/stable/
MIT License
58 stars 12 forks source link

ERROR: UndefVarError: RasData not defined #107

Closed riccile closed 2 years ago

riccile commented 3 years ago

Hi, I can successfully run omniscape on my computer but I got a Rasdata error when I try running the same ini and ascii files on a computing cluster and a different computer. Any ideas why this might be? Circuitscape runs fine on all three. Thanks for your help!

ERROR: UndefVarError: RasData not defined
Stacktrace:
 [1] calculate_current(resistance::Matrix{Float64}, source::Matrix{Float64}, ground::Matrix{Float64}, flags::Circuitscape.RasterFlags, cs_cfg::Dict{String, String}, T::DataType)
   @ Omniscape C:\Users\A02298747\.julia\packages\Omniscape\TtEWy\src\functions.jl:346
 [2] calc_correction(arguments::Dict{String, Int64}, cs_cfg::Dict{String, String}, o::Circuitscape.OutputFlags, conditional::Bool, condition1_present::Matrix{Float64}, condition1_future::Matrix{Float64}, condition2_present::Matrix{Float64}, condition2_future::Matrix{Float64}, comparison1::String, comparison2::String, condition1_lower::Float64, condition1_upper::Float64, condition2_lower::Float64, condition2_upper::Float64, precision::DataType)
   @ Omniscape C:\Users\A02298747\.julia\packages\Omniscape\TtEWy\src\functions.jl:681
 [3] run_omniscape(path::String)
   @ Omniscape C:\Users\A02298747\.julia\packages\Omniscape\TtEWy\src\run_omniscape.jl:250
 [4] top-level scope
   @ REPL[3]:1
vlandau commented 3 years ago

Would you mind sharing the version of Omniscape and Circuitscape that you are using?

You can access this information by running using Pkg to load the needed package, then Pkg.status("Omniscape") and Pkg.status("Circuitscape") to get the version numbers.

vlandau commented 3 years ago

RasData is a data structure defined internally in Circuitscape, but it was eventually renamed to RasterData in later Circuitscape versions, so I think the issue might be mismatching versions of Circuitscape and Omniscape (the version of Omniscape you're using expects an older version of Circuitscape in which the structure was still named RasData, but in your newer version of Circuitscape, that does not exist).

You will most likely be able to solve this issue by ensuring that you have the latest versions of Omniscape and Circuitscape installed on the cluster.

aeduckworth commented 2 years ago

I'm having the same issue. Julia v1.6.3 Circuitscape v5.9.1 Omniscape v0.4.0

I believe these versions are the most recent available that aren't the development versions. Circuitscape running fine, but Omniscape returning the error above noted by riccile.

riccile commented 2 years ago

Sorry, I forgot to respond! I had been using Julia 1.5.3 and once I updated to 1.6.3 I was able to install Omniscape 0.5.3 and that resolved the issue.

vlandau commented 2 years ago

@riccile thanks for posting back! I'm glad everything is working for you. I'm going to mark this issue as resolved.

@aeduckworth you should be able to resolve the issue the same way, by updating Omniscape. Omniscape is currently at version 0.5.5 (you can find the latest version number on the right-hand side of Omniscape's GitHub page, or by going to https://github.com/Circuitscape/Omniscape.jl/releases).