# Clear variable?

**URL:** <https://discourse.julialang.org/t/clear-variable/39592>\
**Category:** New to Julia\
**Tags:** turing\
**Created:** [May 16, 2020, 4:34pm UTC](https://discourse.julialang.org/t/clear-variable/39592 "2020-05-16T16:34:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [May 16, 2020, 5:57pm UTC](https://discourse.julialang.org/t/clear-variable/39592/2 "2020-05-16T17:57:35Z")

</div>

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
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](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757) for more tips

---

_[View the full topic](https://discourse.julialang.org/t/clear-variable/39592)._
