Clear variable?

I don’t think the issue is what you think (though I haven’t used Turing much, so not 100% sure). Here’s where I usually see such an error:

julia> a = [:a, :b]
2-element Array{Symbol,1}:
 :a
 :b

julia> push!(a, 1.)
ERROR: MethodError: Cannot `convert` an object of type Float64 to an object of type Symbol
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:167
  Symbol(::Any...) at strings/basic.jl:206

Because the Vector is of Symbols, and Julia won’t implicity convert a Float to a symbol. I don’t know enough about the functions there to know which might be causing the problem, but you can probably dig into the stack trace and figure it out.

Note: is usually helpful to answering questions if you can include a minimal example of code that causes the error and the entire stack trace. See here for more tips

2 Likes