# Error: find not defined

**URL:** <https://discourse.julialang.org/t/error-find-not-defined/15828>\
**Category:** New to Julia\
**Created:** [October 3, 2018, 3:28pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828 "2018-10-03T15:28:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [October 3, 2018, 3:28pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/1 "2018-10-03T15:28:13Z")

</div>

Trying to use Julia 1.0.1 now, and i got this error.

`ERROR: LoadError: UndefVarError: find not defined`

My code has the `find()` function, and it used to work on 0.6.3.

I’ve found somewhere, that if we had any problem using a function like that, we should type it in the 0.7 version, and see if any warning appears on how to fix it, then i tried, but i got nothing.

```julia
julia> find
find (generic function with 6 methods)

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 3, 2018, 3:29pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/2 "2018-10-03T15:29:50Z")

</div>

You have to actually call the `find` function, or in other words, run your code on 0.7.

---

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [October 3, 2018, 3:39pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/3 "2018-10-03T15:39:15Z")

</div>

Oh, right. Sorry for that.

```julia
julia> find()
┌ Warning: `find` is deprecated, use `findall` instead.
│ caller = top-level scope at none:0
└ @ Core none:0
ERROR: MethodError: no method matching findall()
Closest candidates are:
  findall(::Bool) at array.jl:2053
  findall(::String, ::LibGit2.GitIndex) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\LibGit2\src\index.jl:192
  findall(::getfield(Base, Symbol("##54#55")){typeof(iszero)}, ::BitArray) at bitarray.jl:1546
  ...
Stacktrace:
 [1] find() at .\deprecated.jl:31
 [2] top-level scope at none:0

```

I replaced all `find()` for `findall()` in my code, but i got this error now:

```julia
ERROR: LoadError: MethodError: no method matching setindex_shape_check(::Int64, ::Int64)
Closest candidates are:
  setindex_shape_check(::AbstractArray{#s57,1} where #s57, ::Integer) at indices.jl:218
  setindex_shape_check(::AbstractArray{#s57,1} where #s57, ::Integer, ::Integer) at indices.jl:221
  setindex_shape_check(::AbstractArray{#s57,2} where #s57, ::Integer, ::Integer) at indices.jl:225
  ...
Stacktrace:
 [1] macro expansion at .\multidimensional.jl:641 [inlined]
 [2] _unsafe_setindex!(::IndexLinear, ::Array{Float64,2}, ::Int64, ::Array{Int64,1}) at .\multidimen
sional.jl:636
 [3] _setindex! at .\multidimensional.jl:631 [inlined]
 [4] setindex!(::Array{Float64,2}, ::Int64, ::Array{Int64,1}) at .\abstractarray.jl:998
 [5] MSP(::Int64, ::Int64, ::Float64, ::Float64, ::Int64, ::Array{Any,1}, ::Array{Any,1}, ::Array{An
y,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::
Array{Float64,1}, ::Array{Float64,1}, ::Int64) at C:\Users\Muril\Desktop\Murilo\UFPE\Dissertação\Jul
ia\Arquivos Feitos\MSP.jl:34
 [6] top-level scope at none:0
 [7] include_string(::Module, ::String, ::String) at .\loading.jl:1005
 [8] (::getfield(Atom, Symbol("##128#133")){String,String,Module})() at C:\Users\Muril\.julia\packag
es\Atom\Fha1N\src\eval.jl:120
 [9] withpath(::getfield(Atom, Symbol("##128#133")){String,String,Module}, ::String) at C:\Users\Mur
il\.julia\packages\CodeTools\hB4Hy\src\utils.jl:30
 [10] withpath at C:\Users\Muril\.julia\packages\Atom\Fha1N\src\eval.jl:46 [inlined]
 [11] #127 at C:\Users\Muril\.julia\packages\Atom\Fha1N\src\eval.jl:117 [inlined]
 [12] hideprompt(::getfield(Atom, Symbol("##127#132")){String,String,Module}) at C:\Users\Muril\.jul
ia\packages\Atom\Fha1N\src\repl.jl:84
 [13] macro expansion at C:\Users\Muril\.julia\packages\Atom\Fha1N\src\eval.jl:116 [inlined]
 [14] (::getfield(Atom, Symbol("##126#131")){Dict{String,Any}})() at .\task.jl:85
in expression starting at C:\Users\Muril\Desktop\Murilo\UFPE\Dissertação\Julia\Arquivos Feitos\teste
_fluxo_carga.jl:28

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 3, 2018, 4:03pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/4 "2018-10-03T16:03:25Z")

</div>

Run your code on Julia 0.7 and you would get a warning for that. (Presumably for something like `A[inds] = x` which now needs to be `A[inds] .= x` somewhere in your code.)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 3, 2018, 4:06pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/5 "2018-10-03T16:06:02Z")

</div>

To be explicit:

- Run code on 0.7
- Fix all warnings
- Run code on 1.0.

---

<div class="post-metadata">

**Author:** ![muriloasouza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/muriloasouza/32/4650_2.png) [@muriloasouza](https://discourse.julialang.org/u/muriloasouza)\
**Post date:** [October 3, 2018, 4:17pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/6 "2018-10-03T16:17:09Z")

</div>

Ok, i got it. Fixed a lot of warnings, but still got this one:

```julia
WARNING: Base.readdlm is deprecated: it has been moved to the standard library package `DelimitedFil
es`.
Add `using DelimitedFiles` to your imports.

```

How can i add that command to the imports? Actually, i don’t know what that means.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 3, 2018, 4:25pm UTC](https://discourse.julialang.org/t/error-find-not-defined/15828/7 "2018-10-03T16:25:24Z")

</div>

simply add `using DelimitedFiles` to your package.
