Skip to content

MethodError: Cannot convert an object of type GenericAffExpr{Float64,VariableRef} to an object of type Float64 #21

Description

@weiqiao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions