Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"/hello.jl did not return a UI function" #195

Open
pyrex41 opened this issue Nov 1, 2016 · 7 comments
Open

"/hello.jl did not return a UI function" #195

pyrex41 opened this issue Nov 1, 2016 · 7 comments

Comments

@pyrex41
Copy link

pyrex41 commented Nov 1, 2016

I this output for a basic hello world file from the tutorial as well as for many of the examples; others do not provide any output at all.

output:"... /hello.jl did not return a UI function"

I am running julia 0.5; is this the issue, or is there some other issue?

@shashi
Copy link
Member

shashi commented Nov 1, 2016

Um what's in hello.jl ?

A file you are trying to serve should end with a function definition such as:

function main(window) # must take an argument
end

And this function should return the UI object you want to render

@pyrex41
Copy link
Author

pyrex41 commented Nov 2, 2016

hello.jl is just the hello world example 1 from escher-jl.org. Contains:

function main(window)
plaintext("Hello, World!")
end

Similar results for most example files as well.

@pyrex41
Copy link
Author

pyrex41 commented Nov 2, 2016

I have recreated this issue on ubuntu as as well (initially on OSX), for both my created "hello.jl" file and on the example "forms.jl"

@Max-Tweddell
Copy link

Max-Tweddell commented Nov 2, 2016

I am having the same problem with most of the examples as well.
I haven't checked all of them yet though.

edit:
I have testing all of them and none of the examples work.
Index.jl also can not be found.

@Max-Tweddell
Copy link

Here is a gist paste of the terminal output when I try to load the vectorgraphics example.
https://gist.github.com/Quixoticelixer/b38661a1cf067df809962ec0026aa50e

@Stinners
Copy link

The version of Escher you get from Pkg.add hasn't been updated for v0.5, go to ~/.julia/v0.5/Escher and checkout the master branch to get a working version of the code.

@Nectarineimp
Copy link

I tried @Stinners solution, but it didn't seem to work.
I'm on Windows 7 Pro (Work machine, don't judge :-) ), I have Julia 0.5.0. 16GB of memory. My code looks like:

function main(window)
    plaintext("Hello, World!")
end

Right after I start escher --serve and try to run the simple plaintext("Hello World!") example I get the following:

C:\Users\Peter.Mancini.julia\v0.5\Escher\bin>julia -- escher --serve
WARNING: Method definition require(Symbol) in module Base at loading.jl:345 overwritten in module Escher at C:\Users\Peter.Mancini.julia\v0.5\Requires\src\require.jl:12.
Listening on 0.0.0.0:5555...
WARNING: readbytes is deprecated, use read instead.
in depwarn(::String, ::Symbol) at .\deprecated.jl:64
in readbytes(::IOStream, ::Vararg{IOStream,N}) at .\deprecated.jl:30
in open(::Base.#readbytes, ::String) at .\iostream.jl:113
in fileresponse(::String) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\examples\files.jl:22
in fresp(::String) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\examples\files.jl:26
in (::##30#32{String})(::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Escher\src\cli\serve.jl:219
in (::Mux.##5#6{##29#31{String,Bool},##30#32{String}})(::Function, ::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:15
in (::Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}})(::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:8
in (::Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}})(::Function, ::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:15
in splitquery(::Mux.##1#2{Mux.#toresponse,Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{Mux.##40#42{String,Bool},Mux.##41#43{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##35#39},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##36#40},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}}}}}, ::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\basics.jl:28
in basiccatch(::Mux.##1#2{Mux.#splitquery,Mux.##1#2{Mux.#toresponse,Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{Mux.##40#42{String,Bool},Mux.##41#43{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##35#39},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##36#40},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}}}}}}, ::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\basics.jl:78
in (::Mux.##1#2{Mux.#basiccatch,Mux.##1#2{Mux.#splitquery,Mux.##1#2{Mux.#toresponse,Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{Mux.##40#42{String,Bool},Mux.##41#43{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##35#39},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##36#40},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}}}}}}})(::Dict{Any,Any}) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:8
in (::Mux.##3#4{Mux.##3#4{Mux.#todict,Mux.#basiccatch},Mux.#splitquery})(::Function, ::HttpCommon.Request) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:12
in (::Mux.##1#2{Mux.##3#4{Mux.##3#4{Mux.##3#4{Mux.#todict,Mux.#basiccatch},Mux.#splitquery},Mux.#toresponse},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{##29#31{String,Bool},##30#32{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},Mux.##1#2{Mux.##5#6{Mux.##40#42{String,Bool},Mux.##41#43{String}},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##35#39},Mux.##1#2{Mux.##5#6{Mux.##33#34{Array{SubString{String},1}},##36#40},Mux.##1#2{Mux.##23#24{Mux.##27#28{Symbol,Int64}},Mux.##25#26{String}}}}}}})(::HttpCommon.Request) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\Mux.jl:8
in (::Mux.##7#10{Mux.App})(::HttpCommon.Request, ::HttpCommon.Response) at C:\Users\Peter.Mancini.julia\v0.5\Mux\src\server.jl:31
in (::HttpServer.#on_message_complete#18{HttpServer.Server,HttpServer.Client{TCPSocket},Bool})(::HttpCommon.Request) at C:\Users\Peter.Mancini.julia\v0.5\HttpServer\src\HttpServer.jl:427
in on_message_complete(::Ptr{HttpParser.Parser}) at C:\Users\Peter.Mancini.julia\v0.5\HttpServer\src\RequestParser.jl:104
in http_parser_execute(::HttpParser.Parser, ::HttpParser.ParserSettings, ::Array{UInt8,1}) at C:\Users\Peter.Mancini.julia\v0.5\HttpParser\src\HttpParser.jl:115
in process_client(::HttpServer.Server, ::HttpServer.Client{TCPSocket}, ::Bool) at C:\Users\Peter.Mancini.julia\v0.5\HttpServer\src\HttpServer.jl:389
in (::HttpServer.##8#10{HttpServer.Server,Bool})() at .\task.jl:360
while loading C:\Users\Peter.Mancini.julia\v0.5\Escher\bin\escher, in expression starting on line 48
WARNING: C:\Users\Peter.Mancini.julia\v0.5\Escher\bin\myTest.jl did not return a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants