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

Basic examples - Hello Pie #23

Open
meeheal opened this issue Apr 22, 2022 · 8 comments
Open

Basic examples - Hello Pie #23

meeheal opened this issue Apr 22, 2022 · 8 comments

Comments

@meeheal
Copy link

meeheal commented Apr 22, 2022

Hi.

I've gone through most of the basic examples now, getting them to work and looking at the code. I could not get Hello Pie to work, and haven't been able to find the issue in the code. A few lines from the error I am getting:

MethodError: Cannot `convert` an object of type Char to an object of type AbstractString
│ Closest candidates are:
│   convert(::Type{T}, !Matched::StringEncodings.Encodings.Encoding{enc}) where {T<:AbstractString, enc} at C:\Users\Emile\.julia\packages\StringEncodings\hHXRr\src\encodings.jl:17
│   convert(::Type{T}, !Matched::T) where T<:AbstractString at strings/basic.jl:231
│   convert(::Type{T}, !Matched::AbstractString) where T<:AbstractString at strings/basic.jl:232
│   ...
│ Stacktrace:
│   [1] setindex!(A::Vector{AbstractString}, x::Char, i1::Int64)
│     @ Base .\array.jl:843
│   [2] _append!
│     @ .\array.jl:995 [inlined]
│   [3] append!(a::Vector{AbstractString}, iter::NTuple{156, Char})
│     @ Base .\array.jl:985
│   [4] push!(::Vector{AbstractString}, ::Char, ::Char, ::Char, ::Char, ::Char, ::Vararg{Char, N} where N)
│     @ Base .\array.jl:986
│   [5] deps(channel::String; core_theme::Bool)
│     @ Stipple C:\Users\Emile\.julia\packages\Stipple\5LJ49\src\Stipple.jl:1152
│   [6] layout(output::Vector{AbstractString}; partial::Bool, title::String, class::String, style::String, head_content::String, channel::String, core_theme::Bool)
│     @ Stipple.Layout C:\Users\Emile\.julia\packages\Stipple\5LJ49\src\Layout.jl:47
│   [7] page(elemid::String, args::Vector{ParsedHTMLString}; partial::Bool, title::String, class::String, style::String, channel::String, head_content::String, prepend::String, append::Vector{Any}, core_theme::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│     @ Stipple.Layout C:\Users\Emile\.julia\packages\Stipple\5LJ49\src\Layout.jl:89
│   [8] #page#3
│     @ C:\Users\Emile\.julia\packages\Stipple\5LJ49\src\Layout.jl:99 [inlined]
│   [9] ui(model::HelloPie)
│     @ Main c:\Users\Emile\Desktop\Dash2\stipple\HelloPie.jl:36
│  [10] |>
│     @ .\operators.jl:858 [inlined]
│  [11] (::var"#22#23")()
│     @ Main c:\Users\Emile\Desktop\Dash2\stipple\HelloPie.jl:68

and there's more going all the way to [28]. Would this be an issue with the packages I have installed or is there a variable name misspelled in the code or something else I cannot find?

Thanks very much.

@meeheal
Copy link
Author

meeheal commented Apr 22, 2022

I have been getting some weird behavior. I tried a number of the basic examples two days ago and got to see them just fine. But perhaps I forgot to enter down() which may have been a cause for the Original Posted error: "cannot convert an object of type Char to an object of type AbstractString". Example I had working two days ago, today gave the same error as I believed was a problem with Hello Pie: "cannot convert an object of type Char to an object of type AbstractString". This time I remembered to try down() and tried Hello Pie and the error I got changed where it said something to the effect of variable plot not defined. I then had issues getting the examples I had working yesterday to work again. There appear to be extra tags (that should not be there). For example, Hello Pie (working now, sort of) has this showing at the bottom below the plot:
["", ""][""]
HelloPie

Do I need to uninstall everything and then reinstall? If so, what is the best way to do that?

@meeheal
Copy link
Author

meeheal commented Apr 22, 2022

The basic example (which worked fine yesterday) that is giving me the most problems is CheckBoxVector.

After the final line is executed up(async = true) the errors show up in Julia REPL as:

[ Info: GET /genie.jl/master/assets/js/channels.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
[ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
┌ Error: GET /%22/stippleui.jl/master/assets/js/quasar.umd.min.js/%22 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/model.js 200
[ Info: GET / 200
[ Info: GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: GET /genie.jl/master/assets/js/channels.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
[ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
┌ Error: GET /%22/stippleui.jl/master/assets/js/quasar.umd.min.js/%22 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/model.js 200
[ Info: GET / 200
┌ Error: GET /%22/stippleui.jl/master/assets/css/quasar.min.css/%22 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180
[ Info: GET / 200
[ Info: GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: GET /genie.jl/master/assets/js/channels.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
[ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
┌ Error: GET /%22/stippleui.jl/master/assets/js/quasar.umd.min.js/%22 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/model.js 200

and the browser shows only this

CheckBoxVector

Note there is only this: ["", ""][""] shown.

@AbhimanyuAryan
Copy link
Member

@meeheal can you show output of pkg> st? Weird they both run fine on my end

asdf

@meeheal
Copy link
Author

meeheal commented Apr 25, 2022

Hi Abhimanyu,

       Status `C:\Users\Emile\Desktop\Dash2\stipple\Project.toml`
 [c43c736e] Genie v4.18.0
 [6fe1bfb0] OffsetArrays v1.10.8
 [4acbeb90] Stipple v0.20.5
 [30ddb3f0] StippleCharts v0.17.0
 [ec984513] StipplePlotly v0.10.2
 [a3c5d34a] StippleUI v0.17.0

Everything ran fine for me as well early last week (Tue - Wed, I saw the checkbox vector example in my browser just like in your comment), then something happened, which I don't know what it is. Thank you for looking at my problem!

Note, when I say "then something happened", what I mean is that by running the other examples in the Basic Examples list, that some kind of bug appeared, which is now affecting all of the examples.

@AbhimanyuAryan
Copy link
Member

AbhimanyuAryan commented Apr 25, 2022

Ok you are on windows. What Julia version? I will test it on Windows

@meeheal
Copy link
Author

meeheal commented Apr 25, 2022

I have Julia 1.6.6

@AbhimanyuAryan
Copy link
Member

asdfasdf

tried it on windows 1.6.6 julia. Works fine. Can you delete Manifest.toml and try activate . instantiate again?

@meeheal
Copy link
Author

meeheal commented Apr 26, 2022

This is a long comment, as I will try to describe the issue I am getting. The REPL freezes after whatever variant of up() is run although on the browser side it is not frozen (but may be broken see the first screenshot), and the REPL crashes if I press [ctrl]+C (screenshot included). And the original issue starting from the original post at the start and on to the strange appearance of ["", ""][""] at the bottom of every stipple basic example on the browser side. This I managed to get rid of by creating a new project folder inside a new project directory; just creating a new project folder did not fix it.

Before executing your instructions, yesterday I created a new project folder "stipple2" and did ] add Stipple, StippleUI. This did not solve the problem, as you will see in the first of 3 screenshots in this comment.

Today, I created another new project folder "stipple3" this time in a new directory "Dash3/stipple3". Finally, ["", ""][""] is gone and the browser is functional (see screenshot 2).

So to summarize, a problem originated in "Dash2/stipple" (I think because I forgot to enter down() before trying a different basic example?) and then it carried over to a new project folder "Dash2/stipple2" but after creating a project folder in a new directory "Dash3/stipple3" the ["", ""][""] disappeared, and although the reactive browser works, there still is an issue causing the Julia REPL to freeze.

Below is detailed as accurately as possible what I tried and the screenshot of the result:
As per your recommendations, I tried ] and activate . and instantiate before running the basic demo "StippleButtons" in the project folder "Dash2/stipple2". Here is the browser that opens after the final line up(rand((8000:9000)), open_browser = true) is executed:
ButtonsDe3mo

and back in VSCode, the lines that appear are:

[ Info: GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: GET /genie.jl/master/assets/js/channels.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
[ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
┌ Error: GET /%22/stippleui.jl/master/assets/js/quasar.umd.min.js/%22 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/sbmodel.js 200
┌ Error: GET /favicon.ico 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180

I then retried everything but in the new project folder "Dash3/Stipple3": The browser opens looking good:

ButtonsDemo3

however, back in VSCode, the lines that appear are:

[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
[ Info: GET /stippleui.jl/master/assets/js/quasar.umd.min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/sbmodel.js 200
┌ Error: GET /favicon.ico 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\HJ6UH\src\Router.jl:180

and the REPL is frozen.

So I closed the browser window, then in VSCode, I pressed [ctrl]+C
The REPL closes with an error (a few lines scrolled by in the REPL which went too fast to see but "fatal error" was one of them):

Terminalprocesserror

Now I restart a Julia REPL, enter ] activate ., then [backspace] and rerun the StippleButtons demo and the browser opens up looking fine again as above, and the VSCode lines appear:

┌ Info: 
└ Web Server starting at http://127.0.0.1:8861
Genie.AppServer.WARNING: both HttpCommon and Genie export "Headers"; uses of it in module Html must be qualified
WARNING: both Html and Base export "div"; uses of it in module Stipple must be qualified
WARNING: both Html and Base export "mark"; uses of it in module Stipple must be qualified
WARNING: both Html and Base export "summary"; uses of it in module Stipple must be qualified
WARNING: both Html and Base export "time"; uses of it in module Stipple must be qualified
WARNING: both Html and Base export "view"; uses of it in module Stipple must be qualified
[ Info: GET / 200
ServersCollection(Task (runnable) @0x0000000041520970, nothing)
[ Info: GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: GET /stippleui.jl/master/assets/css/quasar.min.css 200

[ Info: GET /genie.jl/master/assets/js/channels.js 200
julia> [ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
[ Info: GET /stippleui.jl/master/assets/js/quasar.umd.min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue_filters.js 200
[ Info: GET /stipple.jl/master/assets/js/keepalive.js 200
[ Info: GET /stipple.jl/master/assets/js/sbmodel.js 200
┌ Error: GET /favicon.ico 404
└ @ Genie.Router C:\Users\Emile\.julia\packages\Genie\cdRrC\src\Router.jl:181

The REPL is frozen again.

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

2 participants