# Why do I get this error in JET.jl

**URL:** <https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565>\
**Category:** Package Management\
**Created:** [January 5, 2023, 6:31pm UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565 "2023-01-05T18:31:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [January 5, 2023, 6:31pm UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565/1 "2023-01-05T18:31:50Z")

</div>

Hi all 🙂

I’m using that awesome tool JET. It works well, but I get the following error - don’t understand why

```julia
julia> JET.@report_call Dict{String, String}(string(k) => v for (k,v) in enumerate(["1", "2"]))
═════ 2 possible errors found ═════
┌ @ dict.jl:104 h[k] = v
│┌ @ dict.jl:382 v = convert(V, v0)
││ no matching method found `convert(::Type{String}, ::Int64)`: v = convert(V::Type{String}, v0::Int64)
│└───────────────
┌ @ dict.jl:105 = iterate(kv, getfield(_3, 2))
│┌ @ generator.jl:44 y = iterate(tuple(g.iter), s...)
││┌ @ iterators.jl:167 n = Base.Iterators.iterate(tuple(e.itr), rest...)
│││┌ @ array.jl:898 i % Base.UInt
││││ no matching method found `rem(::String, ::Type{UInt64})`: (i::String % Base.UInt)
│││└────────────────

```

Thanks

---

<div class="post-metadata">

**Author:** ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Post date:** [January 5, 2023, 6:54pm UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565/2 "2023-01-05T18:54:25Z")

</div>

Could you try editing your line to `string(k::Int)`? My guess is that inference gives up somewhere and it fails to learn that `k` is `Int`, so you need to tell it so manually.

For what is worth, it seems this particular inference imperfection is fixed on the current nightly branch. I did not get any problems reported on it for your code snippet. This is why I mostly test with JET only on the latest julia version (inference is still getting rapidly better).

When you see something like this in your code (1) you can fix it immediately by telling Julia what the type is and (2) submit a github issue so that devs can make Julia’s inference pass smarter. Generally the JET developer is very grateful for this type of issue reports. It is what they use to make Julia’s inference better.

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [January 5, 2023, 6:58pm UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565/3 "2023-01-05T18:58:53Z")

</div>

ty I’ll try it later!

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [January 6, 2023, 11:28am UTC](https://discourse.julialang.org/t/why-do-i-get-this-error-in-jet-jl/92565/4 "2023-01-06T11:28:48Z")

</div>

I tried it now with the dev version and it’s fixed
