1

我正在关注https://github.com/essenciary/genie-watch-tonight

请帮助我解决以下 SQLite 问题:

julia> using SQLite
[ Info: 2022-01-09 09:46:39 Precompiling SQLite [0aa819cd-b072-5ff4-a722-6bc24af294d9]
ERROR: LoadError: LoadError: UndefVarError: PosLen not defined
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/WeakRefStrings/AN9bY/src/poslenstrings.jl:6
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [3] include(x::String)
    @ WeakRefStrings ~/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:1
  [4] top-level scope
    @ ~/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:543
  [5] include
    @ ./Base.jl:384 [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:1235
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:360 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [10] top-level scope
    @ none:1
in expression starting at /root/.julia/packages/WeakRefStrings/AN9bY/src/poslenstrings.jl:6
in expression starting at /root/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:1
ERROR: LoadError: Failed to precompile WeakRefStrings [ea10d353-3f73-51f8-a26c-33c1cb351aa5] to /root/.julia/compiled/v1.6/WeakRefStrings/jl_SHEw6n.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:384 [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:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /root/.julia/packages/SQLite/5DdLp/src/SQLite.jl:1
ERROR: Failed to precompile SQLite [0aa819cd-b072-5ff4-a722-6bc24af294d9] to /root/.julia/compiled/v1.6/SQLite/jl_sPjABp.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1329
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1043
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:936
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:923

完整日志:

[root@srvr0 ~]# julia

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.4 (2021-11-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> 

julia> using Genie

julia> Genie.newapp_mvc("WatchTonight")
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.6/Project.toml`
  No Changes to `~/.julia/environments/v1.6/Manifest.toml`
Please choose the DB backend you want to use: 
1. SQLite
2. MySQL
3. PostgreSQL
4. Other
Input 1, 2, 3 or 4 and press ENTER to confirm

1
  Activating environment at `~/Project.toml`
   Resolving package versions...
  No Changes to `~/Project.toml`
  No Changes to `~/Manifest.toml`
Precompiling project...
  8 dependencies successfully precompiled in 90 seconds (49 already precompiled)
[ Info: Done! New app created at /root/WatchTonight
[ Info: Changing active directory to /root/WatchTonight
    /tmp/jl_njA2ca/WatchTonight/Project.toml
[ Info: Project.toml has been generated
[ Info: Installing app dependencies
  Activating environment at `~/WatchTonight/Project.toml`
   Resolving package versions...
    Updating `~/WatchTonight/Project.toml`
  [c43c736e] + Genie v4.8.0
  [6d011eab] + Inflector v1.0.1
  [e6f89c97] + LoggingExtras v0.4.7
  [739be429] + MbedTLS v1.0.3
  [ade2ca70] + Dates
  [56ddb016] + Logging
    Updating `~/WatchTonight/Manifest.toml`
  [c7e460c6] + ArgParse v1.1.4
  [00ebfdb7] + CSTParser v3.3.0
  [da1fd8a2] + CodeTracking v1.0.6
  [a80b9123] + CommonMark v0.8.5
  [34da2185] + Compat v3.41.0
  [a8cc5b0e] + Crayons v4.1.0
  [864edb3b] + DataStructures v0.18.11
  [8f5d6c58] + EzXML v1.1.0
  [48062228] + FilePathsBase v0.9.17
  [c43c736e] + Genie v4.8.0
  [cd3eb016] + HTTP v0.9.17
  [77172c1b] + HttpCommon v0.5.0
  [6d011eab] + Inflector v1.0.1
  [83e8ac13] + IniFile v0.5.0
  [692b3bcd] + JLLWrappers v1.3.0
  [682c06a0] + JSON v0.21.2
  [0f8b85d8] + JSON3 v1.9.2
  [98e50ef6] + JuliaFormatter v0.21.1
  [aa1ae85d] + JuliaInterpreter v0.9.0
  [e6f89c97] + LoggingExtras v0.4.7
  [6f1432cf] + LoweredCodeUtils v2.2.0
  [739be429] + MbedTLS v1.0.3
  [39ec1447] + Millboard v0.2.5
  [49dea1ee] + Nettle v0.5.1
  [4d1e1d77] + Nullables v1.0.0
  [bac558e1] + OrderedCollections v1.4.1
  [69de0a69] + Parsers v2.1.3
  [21216c6a] + Preferences v1.2.3
  [92933f4c] + ProgressMeter v1.7.1
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.2.0
  [295af30f] + Revise v3.3.1
  [6c6a2e73] + Scratch v1.1.0
  [69024149] + StringEncodings v0.3.5
  [856f2bd8] + StructTypes v1.8.1
  [b718987f] + TextWrap v1.0.1
  [0796e94c] + Tokenize v0.5.21
  [30578b45] + URIParser v0.4.1
  [5c2747f8] + URIs v1.3.0
  [856ac37a] + UrlDownload v1.0.0
  [a637dc6b] + VersionCheck v0.2.0
  [ddb6d928] + YAML v0.4.7
  [94ce4f54] + Libiconv_jll v1.16.1+1
  [4c82536e] + Nettle_jll v3.7.2+0
  [02c8fc9c] + XML2_jll v2.9.12+0
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [781609d7] + GMP_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll
Precompiling project...
  ✓ LoweredCodeUtils
  ✓ JuliaFormatter
  ✓ Revise
  ✓ Genie
  6 dependencies successfully precompiled in 104 seconds (44 already precompiled)
  4 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
   Resolving package versions...
    Updating `~/WatchTonight/Project.toml`
  [340e8cb6] + SearchLight v2.0.1
    Updating `~/WatchTonight/Manifest.toml`
  [9a962f9c] + DataAPI v1.9.0
  [a93c6f00] + DataFrames v1.3.1
  [e2d170a0] + DataValueInterfaces v1.0.0
  [59287772] + Formatting v0.4.2
  [41ab1584] + InvertedIndices v1.1.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [e1d29d7a] + Missings v1.0.2
  [2dfb63ee] + PooledArrays v1.4.0
  [08abe8d2] + PrettyTables v1.3.1
  [340e8cb6] + SearchLight v2.0.1
  [a2af1166] + SortingAlgorithms v1.0.1
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.6.1
  [9fa8497b] + Future
Precompiling project...
  ✓ LoweredCodeUtils
  ✓ JuliaFormatter
  ✓ Revise
  ✓ Genie
  6 dependencies successfully precompiled in 104 seconds (57 already precompiled)
  4 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
Please choose the DB backend you want to use: 
1. SQLite
2. MySQL
3. PostgreSQL
4. Other
Input 1, 2, 3 or 4 and press ENTER to confirm

1
  Activating environment at `~/WatchTonight/Project.toml`
   Resolving package versions...
    Updating `~/WatchTonight/Project.toml`
  [21a827c4] + SearchLightSQLite v2.0.0
    Updating `~/WatchTonight/Manifest.toml`
  [b99e7846] + BinaryProvider v0.5.10
  [a10d1c49] + DBInterface v2.5.0
  [842dd82b] + InlineStrings v1.1.1
  [0aa819cd] + SQLite v1.3.0
  [21a827c4] + SearchLightSQLite v2.0.0
  [ea10d353] + WeakRefStrings v1.4.1
  [76ed43ae] + SQLite_jll v3.37.0+0
Precompiling project...
  ✓ LoweredCodeUtils
  ✓ JuliaFormatter
  ✓ Revise
  ✓ Genie
  10 dependencies successfully precompiled in 112 seconds (60 already precompiled)
  4 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
[ Info: Installing dependencies for unit tests
  Activating new environment at `~/WatchTonight/test/Project.toml`
   Resolving package versions...
    Updating `~/WatchTonight/test/Project.toml`
  [8dfed614] + Test
    Updating `~/WatchTonight/test/Manifest.toml`
  [2a0f44e3] + Base64
  [b77e0a4c] + InteractiveUtils
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [8dfed614] + Test
  Activating environment at `~/WatchTonight/Project.toml`
[ Info: Starting your brand new Genie app - hang tight!
[ Info: Precompiling WatchTonight [7ec6f24d-0ddf-4222-a368-729503152d97]

 _____         _
|   __|___ ___|_|___
|  |  | -_|   | | -_|
|_____|___|_|_|_|___|

| Web: https://genieframework.com
| GitHub: https://github.com/genieframework/Genie.jl
| Docs: https://genieframework.github.io/Genie.jl/dev
| Gitter: https://gitter.im/essenciary/Genie.jl
| Twitter: https://twitter.com/GenieMVC

Active env: DEV

Loading initializers[ Info: 2022-01-09 09:43:58 Precompiling SearchLight [340e8cb6-72eb-11e8-37ce-c97ebeb32050]

Ready! 

┌ Info: 2022-01-09 09:44:51 
└ Web Server starting at http://127.0.0.1:8000 

julia> up()
┌ Info: 2022-01-09 09:45:04 
└ Web Server starting at http://127.0.0.1:8000 
Genie.AppServer.ServersCollection(Task (failed) @0x00007ff600f07b20, nothing)

julia> using Genie

julia> include(joinpath("config", "initializers", "searchlight.jl"))

julia> using SQLite
[ Info: 2022-01-09 09:46:39 Precompiling SQLite [0aa819cd-b072-5ff4-a722-6bc24af294d9]
ERROR: LoadError: LoadError: UndefVarError: PosLen not defined
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/WeakRefStrings/AN9bY/src/poslenstrings.jl:6
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [3] include(x::String)
    @ WeakRefStrings ~/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:1
  [4] top-level scope
    @ ~/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:543
  [5] include
    @ ./Base.jl:384 [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:1235
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:360 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [10] top-level scope
    @ none:1
in expression starting at /root/.julia/packages/WeakRefStrings/AN9bY/src/poslenstrings.jl:6
in expression starting at /root/.julia/packages/WeakRefStrings/AN9bY/src/WeakRefStrings.jl:1
ERROR: LoadError: Failed to precompile WeakRefStrings [ea10d353-3f73-51f8-a26c-33c1cb351aa5] to /root/.julia/compiled/v1.6/WeakRefStrings/jl_SHEw6n.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:384 [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:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /root/.julia/packages/SQLite/5DdLp/src/SQLite.jl:1
ERROR: Failed to precompile SQLite [0aa819cd-b072-5ff4-a722-6bc24af294d9] to /root/.julia/compiled/v1.6/SQLite/jl_sPjABp.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1329
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1043
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:936
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:923

julia> SQLite.DB("db/netflix_catalog.sqlite")
ERROR: UndefVarError: SQLite not defined
Stacktrace:
 [1] top-level scope
   @ REPL[7]:1
4

1 回答 1

0

我在 WeakRefStrings.jl 包 src/poslenstrings.jl 中添加了一个可变结构

mutable struct PosLen 
    pos::Int
    len::Int
    missingvalue::Bool
    escapedvalue::Bool
end
于 2022-02-04T23:15:44.513 回答