Skip to content

Cannot convert an object of type String to an object of type Symbol #39001

@arseny-sandaar

Description

@arseny-sandaar

Hello,

the convert() function does not work. I could not find how to use it correctly.
Was it changed?

julia> convert(Symbol,"a")
ERROR: MethodError: Cannot `convert` an object of type String to an object of type Symbol
Closest candidates are:
  convert(::Type{T}, ::GenericAffExpr{T,VarType} where VarType) where T at C:\Users\Arsenii.Sleptsov\.julia\packages\JuMP\qhoVb\src\aff_expr.jl:317
  convert(::Type{T}, ::GenericQuadExpr{T,VarType} where VarType) where T at C:\Users\Arsenii.Sleptsov\.julia\packages\JuMP\qhoVb\src\quad_expr.jl:328
  convert(::Type{T}, ::T) where T at essentials.jl:171
  ...
Stacktrace:
 [1] top-level scope at none:1

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