Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodError: no method matching Circuitscape.RasterData(::Matrix{Float64}, ::Matrix{Int64}, ::Matrix{Float64}, ::Matrix{Float64}, ::Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, ::Matrix{Float64}, ::Nothing, ::Circuitscape.RasterMeta) #306

Closed
luroy opened this issue Jul 29, 2021 · 4 comments · Fixed by #310

Comments

@luroy
Copy link

luroy commented Jul 29, 2021

Dear all,

I’ve just started using Circuitscape on Julia with to connect only some focal node pairs (for which the Euclidean distance is less than a given threshold theshold). So I apologize in advance if my following comment is due to my unfamiliarity with Circuitscape include/exclude' option.

From a given input, I ran Circuiscape in all-to-one mode with a file indicating focal node pairs to include following the example file "listofpairstoinclude.txt" in the examples directory. I got the following error when running ini file:

  • in R using “JuliaCall” package:

Erreur : Error happens in Julia.
MethodError: no method matching Circuitscape.RasterData(::Matrix{Float64}, ::Matrix{Int64}, ::Matrix{Float64}, ::Matrix{Float64}, ::Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, ::Matrix{Float64}, ::Nothing, ::Circuitscape.RasterMeta)
Closest candidates are:
Circuitscape.RasterData(::Matrix{T}, ::Matrix{V}, ::Matrix{T}, ::Matrix{T}, ::Tuple{Vector{V}, Vector{V}, Vector{V}}, ::Matrix{T}, !Matched::Circuitscape.IncludeExcludePairs{V}, ::Circuitscape.RasterMeta) where {T, V} at C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\io.jl:35
Stacktrace:
[1] load_raster_data(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\io.jl:443
[2] raster_one_to_all(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\raster\onetoall.jl:4
[3] _compute(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape .\operators.j

  • in Julia 1.6.1 console:

[ Info: 2021-07-29 15:33:18 : Logs will recorded to file: log_file
[ Info: 2021-07-29 15:33:19 : Precision used: Double
[ Info: 2021-07-29 15:33:24 : Reading maps
[ Info: 2021-07-29 15:33:33 : Resistance/Conductance map has 7318334 nodes
ERROR: MethodError: no method matching Circuitscape.RasterData(::Matrix{Float64}, ::Matrix{Int64}, ::Matrix{Float64}, ::Matrix{Float64}, ::Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, ::Matrix{Float64}, ::Nothing, ::Circuitscape.RasterMeta)
Closest candidates are:
Circuitscape.RasterData(::Matrix{T}, ::Matrix{V}, ::Matrix{T}, ::Matrix{T}, ::Tuple{Vector{V}, Vector{V}, Vector{V}}, ::Matrix{T}, ::Circuitscape.IncludeExcludePairs{V}, ::Circuitscape.RasterMeta) where {T, V} at C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\io.jl:35
Stacktrace:
[1] load_raster_data(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\io.jl:443
[2] raster_one_to_all(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\raster\onetoall.jl:4
[3] _compute(T::Type, V::Type, cfg::Dict{String, String})
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\run.jl:0
[4] macro expansion
@ .\timing.jl:287 [inlined]
[5] compute(path::String)
@ Circuitscape C:\Users\l.uroy.julia\packages\Circuitscape\Qr6wW\src\run.jl:31
[6] top-level scope
@ REPL[9]:1

However, I have no error when I do this with the "one-to-all" mode.

Please find all input files and the .ini file associated at the following link: https://drive.google.com/drive/folders/1wdBCJvFvKUArEZjF4MaRfYS9NPawzo-q?usp=sharing

Thank you for your attention to this matter,

Léa

@ranjanan
Copy link
Member

ranjanan commented Aug 9, 2021

@luroy the header of your include / exclude pairs file should have the words "mode" and "include"/"exclude" like https://github.com/Circuitscape/Circuitscape.jl/blob/master/test/input/raster/pairwise/17/pairs_to_include.txt, yours has "X1" and "X2". Having said that, a more sensible error message is in order.

@luroy
Copy link
Author

luroy commented Aug 9, 2021

@ranjanan thank you very much for your answer. I'm really sorry. In trying to report about the error I get when the file is correctly formatted (#311), I induced this error by formatting the file incorrectly...

@ranjanan
Copy link
Member

ranjanan commented Aug 9, 2021

No worries at all @luroy, please don't apologize. Your issues add value to this project by improving it's functionality and polish. 😄 Thanks a lot for reaching out and being involved!

@ranjanan
Copy link
Member

ranjanan commented Aug 9, 2021

I will check out #311 shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants