# Strange warning in 0.7

**URL:** <https://discourse.julialang.org/t/strange-warning-in-0-7/13678>\
**Category:** General Usage\
**Created:** [August 18, 2018, 8:35pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678 "2018-08-18T20:35:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 18, 2018, 8:35pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/1 "2018-08-18T20:35:02Z")

</div>

I am migrating my code to 0.7, and have the following warnings left:

```julia
WARNING: using PyPlot.axes in module Main conflicts with an existing identifier.
┌ Warning: `Array{T}(m::Int) where T` is deprecated, use `Array{T}(undef, m)` instead.
│ caller = top-level scope at none:0
└ @ Core none:0

```

The first warning is related to PyPlot, so I can just wait for an updated version.

But the second warning worries me a little bit, because I don’t understand where it is coming from and how to debug that.

Any idea?

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [August 18, 2018, 8:53pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/2 "2018-08-18T20:53:30Z")

</div>

How did you get it??

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 18, 2018, 8:54pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/3 "2018-08-18T20:54:48Z")

</div>

Well, running one of my programs. But I can’t publish it here. Getting to a MWE (minimal working example) will take some time.

---

<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:** [August 18, 2018, 8:56pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/4 "2018-08-18T20:56:47Z")

</div>

Start julia with `--depwarn=error`, which will give you a stacktrace to the warning.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 18, 2018, 9:05pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/5 "2018-08-18T21:05:23Z")

</div>

I have an MWE for the first warning:

```julia
using PyPlot

```

But this gives a warning only in Juno:

```julia
WARNING: using PyPlot.axes in module Main conflicts with an existing identifier.

```

So probably a problem with Juno.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 18, 2018, 9:07pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/6 "2018-08-18T21:07:17Z")

</div>

Now the stacktrace of the second warning:

```julia
julia> include("analyse_flight.jl")
ERROR: LoadError: `Array{T}(m::Int) where T` is deprecated, use `Array{T}(undef, m)` instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:65
 [2] Array{Analysis,N} where N(::Int64) at ./deprecated.jl:54
 [3] top-level scope at none:0
 [4] include at ./boot.jl:317 [inlined]
 [5] include_relative(::Module, ::String) at ./loading.jl:1038
 [6] include(::Module, ::String) at ./sysimg.jl:29
 [7] include(::String) at ./client.jl:398
 [8] top-level scope at none:0
in expression starting at /media/msata/uavtalk/scripts/analyse_flight.jl:75

```

At least a line number. The following code shows line 75 and the lines before it:

```julia
struct Analysis
    filename::String
    data::DataFrame
    start::Float64 # start time of the analysis [s]
    stop::Float64
    windspeed::Float64 # average wind speed at 10 m height in m/s
    yaw_offset::Float64 # either estimated, or from the log file
    # slice = 1:1
end

Analsis(filename, start, stop, windspeed, yaw_offset) =
        Analysis(filename, CSV.read("../log/"*filename, allowmissing=:none), start, stop, windspeed, yaw_offset)

anas = Array{Analysis}(9)

```

Any idea?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 18, 2018, 9:15pm UTC](https://discourse.julialang.org/t/strange-warning-in-0-7/13678/7 "2018-08-18T21:15:48Z")

</div>

Ok, fixed it:

```julia
anas = Array{Analysis}(undef, 9)

```

Thanks for the tip with the option --depwarn=error

🙂
