# Error when using CuArrays in the VSCode Julia REPL

**URL:** <https://discourse.julialang.org/t/error-when-using-cuarrays-in-the-vscode-julia-repl/42197>\
**Category:** General Usage\
**Tags:** cuda, vscode\
**Created:** [June 28, 2020, 2:29pm UTC](https://discourse.julialang.org/t/error-when-using-cuarrays-in-the-vscode-julia-repl/42197 "2020-06-28T14:29:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![natema](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@natema](https://discourse.julialang.org/u/natema)\
**Post date:** [June 28, 2020, 2:29pm UTC](https://discourse.julialang.org/t/error-when-using-cuarrays-in-the-vscode-julia-repl/42197/1 "2020-06-28T14:29:38Z")

</div>

If I run

```nohighlight
using CuArrays
cu(rand(3))

```

I get

```julia
3-element CuArray{Float32,1,Nothing}:
 0.59194994
 0.6101809
 0.8896474

```

but if I evaluate the two lines above from VSCode with the Julia extension I get the following error

```julia
10-element CuArray{Float32,1,Nothing}:
 0.79257643
 0.14198638
 0.02461351
 0.29941198
 0.3235241
 0.23571241
 0.87274057Internal Error: 
ERROR: MethodError: no method matching size(::CuArray{Float32,1,Nothing})
The applicable method may be too new: running in world age 27151, while current world is 27168.
Closest candidates are:
  size(::CuArray) at /home/natale/.julia/packages/CuArrays/YFdj7/src/array.jl:181 (method too new to be called from this world context.)
  size(::AbstractArray{T,N}, ::Any) where {T, N} at abstractarray.jl:38
  size(::BitArray{1}) at bitarray.jl:99
  ...
Stacktrace:0.99346745
 [1] treerender
( ::CuArray0.67149717{Float32,
1 ,Nothing0.98319286}) at 
/home/natale/.vscode-server/extensions/julialang.language-julia-0.16.8/scripts/packages/VSCodeServer/src/trees.jl:125

julia> (::VSCodeServer.SubTree) at /home/natale/.vscode-server/extensions/julialang.language-julia-0.16.8/scripts/packages/VSCodeServer/src/trees.jl:54
 [3] repl_getvariables_request(::VSCodeServer.JSONRPC.JSONRPCEndpoint, ::Nothing) at /home/natale/.vscode-server/extensions/julialang.language-julia-0.16.8/scripts/packages/VSCodeServer/src/request_handlers.jl:88
 [4] dispatch_msg(::VSCodeServer.JSONRPC.JSONRPCEndpoint, ::VSCodeServer.JSONRPC.MsgDispatcher, ::Dict{String,Any}) at /home/natale/.vscode-server/extensions/julialang.language-julia-0.16.8/scripts/packages/JSONRPC/src/typed.jl:63
 [5] macro expansion at /home/natale/.vscode-server/extensions/julialang.language-julia-0.16.8/scripts/packages/VSCodeServer/src/VSCodeServer.jl:83 [inlined]
 [6] (::VSCodeServer.var"#53#55"{Bool,String})() at ./task.jl:358

```

Any ideas what’s going wrong?

---

<div class="post-metadata">

**Author:** ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)\
**Post date:** [June 28, 2020, 2:33pm UTC](https://discourse.julialang.org/t/error-when-using-cuarrays-in-the-vscode-julia-repl/42197/2 "2020-06-28T14:33:03Z")

</div>

It is known [issue](https://github.com/julia-vscode/julia-vscode/issues/1404) with the VsCode. Hopefully, it will be fixed in the next release.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 28, 2020, 6:01pm UTC](https://discourse.julialang.org/t/error-when-using-cuarrays-in-the-vscode-julia-repl/42197/3 "2020-06-28T18:01:45Z")

</div>

I pushed a new release to everyone that hopefully fixes this.
