-
Notifications
You must be signed in to change notification settings - Fork 189
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
HTML rendering error: nothing should not be printed #156
Comments
@Ankur-deDev Sorry, I need to update that, the API has been massively updated recently, in preparation for v1. I'll take a look and update the README. |
@Ankur-deDev I took a look, I think the only thing needed was to just replace |
Thanks for your quick action.
|
@Ankur-deDev Sorry, yes, completely unrelated issue :-/ Can you please update to latest master?
Until the new v0.13.1 will be registered. |
Great, I tried with the new version and was able to create the app.
The last commit in JuliaLang/julia/base/show.jl could be related to that. |
@Ankur-deDev I can't reproduce - I have a slightly different version of the test app which works fine. julia> BooksController.billgatesbooks()
2019-08-09 09:58:28:DEBUG:Main:SQL QUERY: SELECT "books"."id" AS "books_id", "books"."title" AS "books_title", "books"."author" AS "books_author", "books"."cover" AS "books_cover" FROM "books" ORDER BY books.id ASC
0.186826 seconds (426.70 k allocations: 21.421 MiB, 6.84% gc time)
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Content-Type: text/html
<html lang="en" ><head ><title >Genie Admin</title></head><body ><h1 >Books admin</h1><h1 >Bill Gates' top 7 "recommended books!!"</h1><ul ><li ><p >The Best We Could Do by Thi Bui</p></li><li ><p >Evicted: Poverty and Profit in the American City by Matthew Desmond</p></li><li ><p >Believe Me: A Memoir of Love, Death, and Jazz Chickens by Eddie Izzard</p></li><li ><p >The Sympathizer! by Viet Thanh Nguyen</p></li><li ><p >Energy and Civilization, A History by Vaclav Smil</p></li><li ><p >Leonardo da Vinci by Walter Isaacson</p></li><li ><p >Identity by Francis Fukuyama</p></li></ul></body></html>""" Can you please zip the whole app and share it with me? |
Hi, Thanks a lot for having a look, I have sent you the tarball. |
@Ankur-deDev Thanks - where is it? |
This was actually caused by a sneaky bug, sorry for it. Should be all fixed on the latest #master! |
Closing this as it should be resolved on the latest master. Please reopen if that's not the case. |
I confirm it is working as expected now. Thanks a lot for the quick fix! I had sent the tarball to the address defined in GenieFramework/Genie.jl/Project.toml but it was rejected with the following message (sorry for not realizing earlier that the mail did not go through):
|
@Ankur-deDev Thanks for the update, happy that it works now! |
Describe the bug
I am following the Bill Gates book example here and got the error:
To Reproduce
using Genie; Genie.loadapp(); using BooksController; BooksController.billgatesbooks()
Expected behavior
I am not sure whether this error is a wrong behavior.
Additional context
versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
JULIA_REVISE = auto
pkg> st
Status
~/Tester/Project.toml
[c43c736e] Genie v0.10.1
[682c06a0] JSON v0.21.0
[39ec1447] Millboard v0.2.0
[295af30f] Revise v2.1.6
Stack
ERROR: ArgumentError:
nothing
should not be printed; useshow
,repr
, or custom output instead.Stacktrace:
[1] print(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Nothing) at ./show.jl:566
[2] print(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Nothing, ::String) at ./strings/io.jl:42
[3] normal_element(::Array{Union{Nothing, String},1}, ::String) at /home/user/.julia/packages/Genie/LHtIg/src/Flax.jl:140
[4] normal_element(::getfield(Genie.Renderer, Symbol("##33#37")), ::String, ::Array{Pair{Symbol,Any},1}) at /home/user/.julia/packages/Genie/LHtIg/src/Flax.jl:116
[5] #body#36 at ./none:2 [inlined]
[6] body at ./none:2 [inlined]
[7] (::getfield(Genie.Renderer, Symbol("##30#34")))() at /home/user/Books/build/FlaxViews/a61fb571d6f0fc6e87fc97c269d5d6c775adde87.jl:4
[8] normal_element at /home/user/.julia/packages/Genie/LHtIg/src/Flax.jl:116 [inlined]
[9] #html#32 at ./none:2 [inlined]
[10] #html at ./none:0 [inlined]
[11] func_a61fb571d6f0fc6e87fc97c269d5d6c775adde87() at /home/user/Books/build/FlaxViews/a61fb571d6f0fc6e87fc97c269d5d6c775adde87.jl:4
[12] #invokelatest#1 at ./essentials.jl:697 [inlined]
[13] invokelatest at ./essentials.jl:696 [inlined]
[14] |> at ./operators.jl:813 [inlined]
[15] #tohtml#2(::Symbol, ::Module, ::Base.Iterators.Pairs{Symbol,Array{BooksController.Book,1},Tuple{Symbol},NamedTuple{(:books,),Tuple{Array{BooksController.Book,1}}}}, ::Function, ::Symbol, ::Symbol) at /home/user/.julia/packages/Genie/LHtIg/src/Renderer.jl:52
The text was updated successfully, but these errors were encountered: