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: Cannot convert an object of type GenericAffExpr{Float64,VariableRef} to an object of type Float64 #21

Open
weiqiao opened this issue Feb 1, 2021 · 0 comments

Comments

@weiqiao
Copy link

weiqiao commented Feb 1, 2021

When I ran test/runtests.jl I got errors

default dual_mode: Error During Test at /home/weiqiao/MomentOpt.jl-0.2.0/test/approximate.jl:43
  Got exception outside of a @test
  MethodError: Cannot `convert` an object of type GenericAffExpr{Float64,VariableRef} to an object of type Float64
  Closest candidates are:
    convert(::Type{T}, !Matched::T) where T<:Number at number.jl:6
    convert(::Type{T}, !Matched::Number) where T<:Number at number.jl:7
    convert(::Type{T}, !Matched::Base.TwicePrecision) where T<:Number at twiceprecision.jl:250

and

Dual Schmuedgen: Error During Test at /home/weiqiao/workstation/MomentOpt.jl-0.2.0/test/approximate.jl:98
  Got exception outside of a @test
  MethodError: Cannot `convert` an object of type GenericAffExpr{Float64,VariableRef} to an object of type Float64
  Closest candidates are:
    convert(::Type{T}, !Matched::T) where T<:Number at number.jl:6
    convert(::Type{T}, !Matched::Number) where T<:Number at number.jl:7
    convert(::Type{T}, !Matched::Base.TwicePrecision) where T<:Number at twiceprecision.jl:250

BTW I was running on tag v0.2.0, not the master branch. The master branch has a different error.

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

No branches or pull requests

1 participant