ERROR: type Task has no field parent


The following example on latest Julia master produces the error below. I managed to reproduce it using Flux#master and the latest released version in a simple example, but I am not entirely sure if it has anything to do with that package, or where to report this; suggestions would be appreciated. Works fine (without error) on Julia v1.0.1.

function foo() end
using Flux
function bar() end


julia> VERSION

julia> function foo() end
foo (generic function with 1 method)

julia> using Flux

julia> function bar() end
Error showing value of type typeof(bar):
ERROR: type Task has no field parent
 [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
 [2] isroot(::Task) at /home/tamas/.julia/packages/Media/Lrdeg/src/dynamic.jl:83
 [3] binding(::Media.Binding{Any}, ::Task) at /home/tamas/.julia/packages/Media/Lrdeg/src/dynamic.jl:98 (repeats 2 times)
 [4] getindex at /home/tamas/.julia/packages/Media/Lrdeg/src/dynamic.jl:106 [inlined]
 [5] current_input at /home/tamas/.julia/packages/Media/Lrdeg/src/system.jl:141 [inlined]
 [6] pool() at /home/tamas/.julia/packages/Media/Lrdeg/src/system.jl:152
 [7] #getdisplay#6(::Nothing, ::Function, ::Type) at /home/tamas/.julia/packages/Media/Lrdeg/src/system.jl:155
 [8] getdisplay(::Type) at /home/tamas/.julia/packages/Media/Lrdeg/src/system.jl:155
 [9] render(::Function) at /home/tamas/.julia/packages/Media/Lrdeg/src/system.jl:160
 [10] display(::Media.DisplayHook, ::Function) at /home/tamas/.julia/packages/Media/Lrdeg/src/compat.jl:9
 [11] display(::Any) at ./multimedia.jl:287
 [12] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [13] invokelatest at ./essentials.jl:696 [inlined]
 [14] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:155
 [15] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:140
 [16] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(REPL, Symbol("##48#57")){REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:714
 [17] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [18] invokelatest at ./essentials.jl:696 [inlined]
 [19] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2268
 [20] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1035
 [21] run_repl(::REPL.AbstractREPL, ::Any) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/REPL/src/REPL.jl:192
 [22] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [23] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [24] invokelatest at ./essentials.jl:696 [inlined]
 [25] macro expansion at ./logging.jl:308 [inlined]
 [26] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [27] exec_options(::Base.JLOptions) at ./client.jl:242
 [28] _start() at ./client.jl:421

It would probably be best if Flux could drop the dependency on Juno.jl, since most goodies that got you should be available via more generic mechanisms now.

1 Like

Thanks. Unfortunately, Flux.jl uses Juno.@progress for tranining so it is difficult to load conditionally.


You can get that without depending on Juno now though. See e.g. here (since I haven’t written the relevant docs yet).


Since no one has posted any updates to this, the issue has been fixed recently. If you install Media.jl 0.5.0, it works as it should.