FluxML / Gym.jl

Gym environments in Julia
MIT License
54 stars 19 forks source link

rendering not working #11

Closed kraftpunk97-zz closed 5 years ago

kraftpunk97-zz commented 5 years ago

While working on the module, I discovered that calling the WebIO's display function gives an error.

display(ctx.s)
ERROR: UndefVarError: HandlerFunction not defined
Stacktrace:
 [1] #WebIOServer#82(::String, ::Int64, ::Bool, ::Bool, ::String, ::Base.DevNull, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Type, ::typeof(Atom.routepages)) at /Users/kartikeygupta/.julia/packages/WebIO/Rk8wc/src/providers/generic_http.jl:110
 [2] Type at ./none:0 [inlined]
 [3] setup_server at /Users/kartikeygupta/.julia/packages/Atom/y9pNA/src/display/webio.jl:76 [inlined]
 [4] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("application/prs.juno.plotpane+html")}, ::WebIO.Scope) at /Users/kartikeygupta/.julia/packages/Atom/y9pNA/src/display/webio.jl:68
 [5] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::String, ::WebIO.Scope) at ./multimedia.jl:79
 [6] displayinplotpane(::WebIO.Scope) at /Users/kartikeygupta/.julia/packages/Atom/y9pNA/src/display/showdisplay.jl:41
 [7] display(::Atom.JunoDisplay, ::WebIO.Scope) at /Users/kartikeygupta/.julia/packages/Atom/y9pNA/src/display/showdisplay.jl:102
 [8] display(::Any) at ./multimedia.jl:287
 [9] top-level scope at none:0

julia> using WebSockets

julia> HTTP
ERROR: UndefVarError: HTTP not defined

julia> using WebSockets: HTTP

julia> HTTP
HTTP

julia> typeof(HTTP)
Module

julia> HTTP.HandlerFunction
ERROR: UndefVarError: HandlerFunction not defined

Is this error reproducible?

kraftpunk97-zz commented 5 years ago

leaving this issue closed until further testing to avoid the possibility of a false alarm.

baggepinnen commented 5 years ago

We see the same error, do you remember how you resolved it?

kraftpunk97-zz commented 5 years ago

@baggepinnen Yeah. The way I over came this, is by using Blink instead of WebIO. In the README.md example, simply uncomment the two lines after the call to the display function.

It's not great, but we're working on it.We hope to get a better rendering system within a week; two at most.

kraftpunk97-zz commented 5 years ago

@baggepinnen when you're using the Blink method for rendering, do not call display