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

Error when running using Geni #48

Closed
drinkmorewaters opened this issue Aug 13, 2018 · 24 comments
Closed

Error when running using Geni #48

drinkmorewaters opened this issue Aug 13, 2018 · 24 comments

Comments

@drinkmorewaters
Copy link

Error when running "using Genie"

Julia 1.0 OSX

`julia> using Genie
[ Info: Precompiling Genie [f2e6c872-b7ec-5699-ac8c-130193b63b97]
ERROR: LoadError: LoadError: ArgumentError: Package Genie does not have YAML in its dependencies:

  • If you have Genie checked out for development and have
    added YAML as a dependency but haven't updated your primary
    environment's manifest file, try Pkg.resolve().
  • Otherwise you may need to report an issue with Genie
    Stacktrace:
    [1] require(::Module, ::Symbol) at ./loading.jl:830
    [2] include at ./boot.jl:317 [inlined]
    [3] include_relative(::Module, ::String) at ./loading.jl:1038
    [4] include at ./sysimg.jl:29 [inlined]
    [5] include(::String) at /Users/dell/.julia/packages/Genie/3qBuH/src/Genie.jl:4
    [6] top-level scope at none:0
    [7] include at ./boot.jl:317 [inlined]
    [8] include_relative(::Module, ::String) at ./loading.jl:1038
    [9] include(::Module, ::String) at ./sysimg.jl:29
    [10] top-level scope at none:2
    [11] eval at ./boot.jl:319 [inlined]
    [12] eval(::Expr) at ./client.jl:389
    [13] top-level scope at ./none:3
    in expression starting at /Users/dell/.julia/packages/Genie/3qBuH/src/Configuration.jl:6
    in expression starting at /Users/dell/.julia/packages/Genie/3qBuH/src/Genie.jl:8
    ERROR: Failed to precompile Genie [f2e6c872-b7ec-5699-ac8c-130193b63b97] to /Users/dell/.julia/compiled/v1.0/Genie/MKohm.ji.
    Stacktrace:
    [1] error(::String) at ./error.jl:33
    [2] macro expansion at ./logging.jl:313 [inlined]
    [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
    [4] macro expansion at ./logging.jl:311 [inlined]
    [5] _require(::Base.PkgId) at ./loading.jl:941
    [6] require(::Base.PkgId) at ./loading.jl:852
    [7] macro expansion at ./logging.jl:311 [inlined]
    [8] require(::Module, ::Symbol) at ./loading.jl:834`
@drinkmorewaters
Copy link
Author

Doesn't work on 0.7 either. So not sure. Tried "Pkg.resolve()" nothing was updated.

@essenciary
Copy link
Member

@drinkmorewaters Give it a few more days, I'm working on it. v0.7/v1.0 was a massive rewrite and the Pkg situation is still in limbo. I'm working on sorting it out these days, I'm almost there.

@drinkmorewaters
Copy link
Author

No rush, thanks for the hard work.

@essenciary
Copy link
Member

Cheers! I'll update you on this issue.

@essenciary
Copy link
Member

Can you check now? I pushed a lot of updates (plus new README)

@drinkmorewaters
Copy link
Author

using Genie
[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]
ERROR: LoadError: LoadError: InitError: ArgumentError: Unknown time zone "Asia/Makassar"
Stacktrace:
[1] (::getfield(TimeZones, Symbol("##1#3")){SubString{String}})() at /Users/dell/.julia/packages/TimeZones/wytr8/src/TimeZones.jl:70
[2] get!(::getfield(TimeZones, Symbol("##1#3")){SubString{String}}, ::Dict{AbstractString,Dates.TimeZone}, ::SubString{String}) at ./dict.jl:453
[3] Type at /Users/dell/.julia/packages/TimeZones/wytr8/src/TimeZones.jl:64 [inlined]
[4] localzone() at /Users/dell/.julia/packages/TimeZones/wytr8/src/local.jl:25
[5] Type at /Users/dell/.julia/packages/Memento/QMKyB/src/formatters.jl:35 [inlined]
[6] #config!#71(::String, ::Dict{AbstractString,Int64}, ::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Memento.Logger, ::String) at /Users/dell/.julia/packages/Memento/QMKyB/src/config.jl:39
[7] #config!#69 at /Users/dell/.julia/packages/Memento/QMKyB/src/config.jl:36 [inlined]
[8] config! at /Users/dell/.julia/packages/Memento/QMKyB/src/config.jl:25 [inlined]
[9] init() at /Users/dell/.julia/packages/Memento/QMKyB/src/Memento.jl:67
[10] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:627
[11] _require_from_serialized(::String) at ./loading.jl:678
[12] _require(::Base.PkgId) at ./logging.jl:317
[13] require(::Base.PkgId) at ./loading.jl:852
[14] macro expansion at ./logging.jl:311 [inlined]
[15] require(::Module, ::Symbol) at ./loading.jl:834
[16] include at ./boot.jl:317 [inlined]
[17] include_relative(::Module, ::String) at ./loading.jl:1038
[18] include at ./sysimg.jl:29 [inlined]
[19] include(::String) at /Users/dell/.julia/packages/Genie/v85ZV/src/Genie.jl:4
[20] top-level scope at none:0
[21] include at ./boot.jl:317 [inlined]
[22] include_relative(::Module, ::String) at ./loading.jl:1038
[23] include(::Module, ::String) at ./sysimg.jl:29
[24] top-level scope at none:2
[25] eval at ./boot.jl:319 [inlined]
[26] eval(::Expr) at ./client.jl:389
[27] top-level scope at ./none:3
during initialization of module Memento
in expression starting at /Users/dell/.julia/packages/Genie/v85ZV/src/Loggers.jl:6
in expression starting at /Users/dell/.julia/packages/Genie/v85ZV/src/Genie.jl:24
ERROR: Failed to precompile Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e] to /Users/dell/.julia/compiled/v1.0/Genie/8eazC.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834

@drinkmorewaters
Copy link
Author

Failed to run on OSX Julia 1.0

@essenciary
Copy link
Member

@drinkmorewaters Looks like an error in TimeZones.jl -- Unknown time zone "Asia/Makassar"
I suggest opening an issue with https://github.com/JuliaTime/TimeZones.jl

@essenciary
Copy link
Member

Hmm, strange, it's not a problem in TimeZones...

julia> using TimeZones

julia> tz"Asia/Makassar"
Asia/Makassar (UTC+8)

Must be Memento.jl related. I'll take a closer look.

@essenciary
Copy link
Member

Stumbled into something similar when testing on Ubuntu -- TimeZones.jl failed to download its database. I'm going to try again - might be related to that.

@essenciary
Copy link
Member

@drinkmorewaters Lmk if you can successfully build TimeZones.jl -- there might be something wrong there

@essenciary
Copy link
Member

essenciary commented Sep 15, 2018

I can't reproduce the issue on the latest version of Windows 10. Please reopen if you have more details.

@scheung38
Copy link

scheung38 commented Dec 30, 2018

Also getting this in Mac OSX when

$  julia genie.jl s 

or

julia> run(`julia genie.jl s`)


ERROR: LoadError: LoadError: InitError: ArgumentError: Unknown time zone "Europe/London"
Stacktrace:
 [1] (::getfield(TimeZones, Symbol("##1#3")){SubString{String}})() at $HOME/.julia/packages/TimeZones/wytr8/src/TimeZones.jl:70](url)

But

julia> using TimeZones
julia> tz"Europe/London"
Europe/London (UTC+0/UTC+1)

EDIT:

after

Pkg.add("Memento") 
julia> include("genie.jl")

this Unknown time zone goes away and next error is:

`ERROR: LoadError: invalid redefinition of constant App
Stacktrace:
[1] top-level scope at none:0

[2] eval(::Module, ::Any) at ./boot.jl:319

[3] top-level scope at none:0

[4] include at ./boot.jl:317 [inlined]

[5] include_relative(::Module, ::String) at ./loading.jl:1044

[6] include(::Module, ::String) at ./sysimg.jl:29

[7] include(::String) at ./client.jl:392

[8] top-level scope at util.jl:156

in expression starting at $HOME/julia_projects/demo_app/genie.jl:43
`

@ghost
Copy link

ghost commented Apr 27, 2022

error When running using Genie into Genie REPL integrate in vscode

julia> using Genie
[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]
ERROR: LoadError: InitError: MethodError: no method matching Base.TOMLCache()
Closest candidates are:
Base.TOMLCache(::Base.TOML.Parser, ::Dict{String, Base.CachedTOMLDict}) at /opt/julia-1.7.2/share/julia/base/loading.jl:234
Base.TOMLCache(::Any, ::Any) at /opt/julia-1.7.2/share/julia/base/loading.jl:234
Stacktrace:
[1] manifest_file(project_file::String)
@ Revise ~/.julia/packages/Revise/qxX5H/src/pkgs.jl:451
[2] manifest_file
@ ~/.julia/packages/Revise/qxX5H/src/pkgs.jl:461 [inlined]
[3] init()
@ Revise ~/.julia/packages/Revise/qxX5H/src/Revise.jl:1334
[4] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:768
[5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:854
[6] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1097
[7] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[9] include
@ ./Base.jl:418 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base ./loading.jl:1318
[11] top-level scope
@ none:1
[12] eval
@ ./boot.jl:373 [inlined]
[13] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[14] top-level scope
@ none:1
during initialization of module Revise
in expression starting at /home/precis/.julia/packages/Genie/HJ6UH/src/Genie.jl:1
ERROR: Failed to precompile Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e] to /home/precis/.julia/compiled/v1.7/Genie/jl_2BTwto.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] eval
@ ./boot.jl:373 [inlined]
[8] eval
@ ./Base.jl:68 [inlined]
[9] repleval(m::Module, code::Expr, #unused#::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:157
[10] (::VSCodeServer.var"#78#80"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:123
[11] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:511
[12] with_logger
@ ./logging.jl:623 [inlined]
[13] (::VSCodeServer.var"#77#79"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:124
[14] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[15] invokelatest(::Any)
@ Base ./essentials.jl:714
[16] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
[17] (::VSCodeServer.var"#60#61")()
@ VSCodeServer ./task.jl:423

@ghost
Copy link

ghost commented Apr 27, 2022

What should I do

@essenciary
Copy link
Member

@precis19 This is not a Genie issue - looks like a Julia/Pkg problem. Can you show the output of pkg> st ?

@ghost
Copy link

ghost commented Apr 27, 2022

What do you mean?
I don't understand

@essenciary
Copy link
Member

Go into package management mode (by typing ] at the julia> prompt) and then run st to see what packges are installed and how. Maybe that provides some insight into the Pkg problem you're facing.

@ghost
Copy link

ghost commented Apr 27, 2022

there are
(@v1.7) pkg> st
Status ~/.julia/environments/v1.7/Project.toml
[336ed68f] CSV v0.8.5
[a93c6f00] DataFrames v0.21.8
[31c24e10] Distributions v0.25.45
[587475ba] Flux v0.8.3
[c43c736e] Genie v4.18.0
[cd3eb016] HTTP v0.9.17
[682c06a0] JSON v0.21.3
[a93385a2] JuliaDB v0.13.0
[a15396b6] OnlineStats v1.4.0
[91a5bcdd] Plots v0.28.4
[340e8cb6] SearchLight v0.21.1
[44d3d7a6] Weave v0.10.10
[10745b16] Statistics

@ghost
Copy link

ghost commented Apr 27, 2022

Exuse me Genie.newapp_mvc doesn't work
It's like this

julia> Genie.newapp_mvc("Watch tonight")

Please choose the DB backend you want to use:

  1. SQLite
  2. MySQL
  3. PostgreSQL
  4. Skip installing DB support at this time

Input 1, 2, 3 or 4 and press ENTER to confirm.
If you are not sure what to pick, choose 1 (SQLite). It is the simplest option to get you started right away.
You can add support for additional databases anytime later.

1
Activating project at ~/.local/share/Trash/files/Watchtonight/Watchtonight
[ Info: Done! New app created at /home/precis/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight
[ Info: Changing active directory to /home/precis/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight
/tmp/jl_56IRK2/Watchtonight/Project.toml
[ Info: Project.toml has been generated
[ Info: Installing app dependencies
Activating project at ~/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight
Activating project at ~/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight
[ Info: Installing dependencies for unit tests
Activating new project at ~/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight/test
Activating project at ~/.local/share/Trash/files/Watchtonight/Watchtonight/Watchtonight
[ Info: Starting your brand new Genie app - hang tight!
[ Info: Precompiling SearchLightSQLite [21a827c4-482a-11ea-3a19-4d2243a4a2c5]
ERROR: LoadError: UndefVarError: PosLen not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ WeakRefStrings ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
[4] top-level scope
@ ~/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:547
[5] include
@ ./Base.jl:418 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1318
[7] top-level scope
@ none:1
[8] eval
@ ./boot.jl:373 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[10] top-level scope
@ none:1
in expression starting at /home/precis/.julia/packages/WeakRefStrings/31nkb/src/poslenstrings.jl:6
in expression starting at /home/precis/.julia/packages/WeakRefStrings/31nkb/src/WeakRefStrings.jl:1
ERROR: LoadError: Failed to precompile WeakRefStrings [ea10d353-3f73-51f8-a26c-33c1cb351aa5] to /home/precis/.julia/compiled/v1.7/WeakRefStrings/jl_TlgmHK.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] include
@ ./Base.jl:418 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1318
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[12] top-level scope
@ none:1
in expression starting at /home/precis/.julia/packages/SQLite/wpQeE/src/SQLite.jl:1
ERROR: LoadError: Failed to precompile SQLite [0aa819cd-b072-5ff4-a722-6bc24af294d9] to /home/precis/.julia/compiled/v1.7/SQLite/jl_91SRRl.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] include
@ ./Base.jl:418 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base ./loading.jl:1318
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[12] top-level scope
@ none:1
in expression starting at /home/precis/.julia/packages/SearchLightSQLite/sLmGI/src/SearchLightSQLite.jl:1
ERROR: Failed to precompile SearchLightSQLite [21a827c4-482a-11ea-3a19-4d2243a4a2c5] to /home/precis/.julia/compiled/v1.7/SearchLightSQLite/jl_Ymjnk0.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] eval
@ ./boot.jl:373 [inlined]
[8] loadapp(path::String; autostart::Bool, dbadapter::String)
@ Genie ~/.julia/packages/Genie/HJ6UH/src/Genie.jl:198
[9] autostart_app(path::String; autostart::Bool, initdb::Bool, dbadapter::String)
@ Genie.Generator ~/.julia/packages/Genie/HJ6UH/src/Generator.jl:594
[10] post_create(app_name::String, app_path::String; autostart::Bool, testmode::Bool, dbsupport::Bool, dbadapter::String, interactive::Bool)
@ Genie.Generator ~/.julia/packages/Genie/HJ6UH/src/Generator.jl:706
[11] newapp(app_name::String; autostart::Bool, fullstack::Bool, dbsupport::Bool, mvcsupport::Bool, testmode::Bool, dbadapter::Nothing, interactive::Bool)
@ Genie.Generator ~/.julia/packages/Genie/HJ6UH/src/Generator.jl:686
[12] #newapp_mvc#45
@ ~/.julia/packages/Genie/HJ6UH/src/Generator.jl:769 [inlined]
[13] newapp_mvc(path::String)
@ Genie.Generator ~/.julia/packages/Genie/HJ6UH/src/Generator.jl:769
[14] top-level scope
@ REPL[9]:1

@essenciary
Copy link
Member

I suspect that your version of SearchLight is very old - current version is 2.2.2. cd into ~/.local/share/Trash/files/Watchtonight/Watchtonight run julia --project then please pass me the output of pkg> st.

@ghost
Copy link

ghost commented Apr 28, 2022

there it is
(@v1.7) pkg> st
Status ~/.julia/environments/v1.7/Project.toml
[336ed68f] CSV v0.8.5
[a93c6f00] DataFrames v0.21.8
[31c24e10] Distributions v0.25.45
[587475ba] Flux v0.8.3
[c43c736e] Genie v4.18.0
[cd3eb016] HTTP v0.9.17
[682c06a0] JSON v0.21.3
[a93385a2] JuliaDB v0.13.0
[a15396b6] OnlineStats v1.4.0
[91a5bcdd] Plots v0.28.4
[340e8cb6] SearchLight v0.21.1
[44d3d7a6] Weave v0.10.10
[10745b16] Statistics

@ghost
Copy link

ghost commented Apr 28, 2022

there are
(@v1.7) pkg> st
Status ~/.julia/environments/v1.7/Project.toml
[336ed68f] CSV v0.8.5
[a93c6f00] DataFrames v0.21.8
[31c24e10] Distributions v0.25.45
[587475ba] Flux v0.8.3
[c43c736e] Genie v4.18.0
[cd3eb016] HTTP v0.9.17
[682c06a0] JSON v0.21.3
[a93385a2] JuliaDB v0.13.0
[a15396b6] OnlineStats v1.4.0
[91a5bcdd] Plots v0.28.4
[340e8cb6] SearchLight v0.21.1
[44d3d7a6] Weave v0.10.10
[10745b16] Statistics

@essenciary
Copy link
Member

essenciary commented Apr 28, 2022

Did you

cd into ~/.local/share/Trash/files/Watchtonight/Watchtonight run julia --project

Cause the output is from the global @v1.7 Project, not Watchtonight.

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

3 participants