Closed evadelmas closed 2 years ago
I never had this error when building the documentation, and I tried to reproduce this error but I couldn't.
Do you have the same error when you run the tests? ((BEFWM2) pkg> test
in the REPL)
Also, could you run send the package list of the environment BEFWM2 and the environment docs (to be sure everything is good) and also in both of these environments run pkg> instantiate
to be sure that all the dependencies are up to date (if not already done).
I have the same error when running the tests. Here is (one of) the stacktrace:
ERROR: MethodError: no method matching spzeros(::Type{Float64}, ::Tuple{Int64, Int64})
│ Closest candidates are:
│ spzeros(::Type{Tv}, !Matched::Type{Ti}, !Matched::Tuple{Integer, Integer}) where {Tv, Ti} at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/SparseArrays/src/sparsematrix.jl:1678
│ spzeros(::Type{T}, !Matched::Integer) where T at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/SparseArrays/src/sparsevector.jl:128
│ spzeros(::Type{Tv}, !Matched::Integer, !Matched::Integer) where Tv at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/SparseArrays/src/sparsematrix.jl:1672
│ ...
│ Stacktrace:
│ [1] assimilation_efficiency(foodweb::FoodWeb; e_herbivore::Float64, e_carnivore::Float64)
│ @ BEFWM2 ~/projets/BEFWM2/src/inputs/functional_response.jl:121
│ [2] assimilation_efficiency(foodweb::FoodWeb)
│ @ BEFWM2 ~/projets/BEFWM2/src/inputs/functional_response.jl:120
│ [3] BioRates(foodweb::FoodWeb)
│ @ BEFWM2 ~/projets/BEFWM2/src/inputs/biological_rates.jl:181
│ [4] ModelParameters(foodweb::FoodWeb)
│ @ BEFWM2 ~/projets/BEFWM2/src/model/model_parameters.jl:100
│ [5] top-level scope
│ @ none:1
└ @ Documenter.DocTests ~/projets/BEFWM2/src/model/model_parameters.jl:55
And my env.:
(BEFWM2) pkg> st
Project BEFWM2 v0.1.0
Status `~/projets/BEFWM2/Project.toml`
[2b5f629d] DiffEqBase v6.83.2
[0c46a032] DifferentialEquations v6.20.0
[f03a62fe] EcologicalNetworks v0.5.2
[2f01184e] SparseArrays
[10745b16] Statistics
I will have a more thorough look into it later today, it's probably an easy fix, seems to be nothing more than a method error. One of the thing that may be causing this is that I think you are working and running tests on your own fork (ilajaait/BEFWM2
)? Can you reproduce the error if you clone BecksLab/BEFWM2
and run the tests from it?
I cloned BecksLab/BEFWM2
, run the tests and I had no error.
Do you work also with Julia 1.7.2? If you do a new clone of the repo BecksLab/BEFWM2
and run the tests do you still have the error?
PS: you are working from the develop
branch, right? I assume so, but I ask just to be sure.
If I change spzeros(Float64, (S, S))
to spzeros(Float64, S, S)
it has the desired behavior, it's strange that the former works for you...
(yes, I'm on the develop
branch)
It's weird. Can you tell me what is your Julia version ? As SparseArrays is now included in Base (I think) maybe it comes from that (a method of spzeros
that has been deleted or added).
Anyway, the syntax spzeros(Float64, S, S)
also works for me so we can switch to this to avoid the bug.
Ha, I haven't updated to 1.7 yet, that may be what's causing the problem.
Closed by #20
When building the documentation (
julia --project=docs docs/make.jl
), code blocks fail with the following message:doctest failure in ~/projets/BEFWM2/src/...
Seems to be because of this: