Julia出現錯誤ERROR: LoadError: syntax: try without catch or finally

因項目要求進行機器學習數據可視化,要求嘗試使用Julia,在此,記錄下遇到的坑,僅爲記錄效果。後續陸續更新。python

問題一:關於LightML庫中的坑:ERROR: LoadError: syntax: try without catch or finallygit

問題描述: github

ENV["PYTHON"]=""
Pkg.add("Conda")
using Conda
Conda.add("python==2.7.13")
Conda.add("matplotlib")
Conda.add("scikit-learn")
Pkg.add("PyCall")
Pkg.build("PyCall")
Pkg.clone("https://github.com/memoiry/LightML.jl")

當使用using LightML時出現問題:ERROR: LoadError: syntax: try without catch or finallyexpress

[ Info: Precompiling LightML [21c72615-c80e-5f28-8897-21b7f06a9402]
ERROR: LoadError: syntax: try without catch or finally
Stacktrace:
 [1] include at .\boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at .\loading.jl:1038
 [3] include(::Module, ::String) at .\sysimg.jl:29
 [4] top-level scope at none:2
 [5] eval at .\boot.jl:319 [inlined]
 [6] eval(::Expr) at .\client.jl:389
 [7] top-level scope at .\none:3
in expression starting at C:\Users\admin\.julia\packages\Gadfly\ojGNo\src\Gadfly.jl:971
ERROR: LoadError: Failed to precompile Gadfly [c91e804a-d5a3-530f-b6f0-dfbca275c004] to C:\Users\admin\.julia\compiled\v1.0\Gadfly\DvECm.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
 [8] include at .\boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at .\loading.jl:1038
 [10] include(::Module, ::String) at .\sysimg.jl:29
 [11] top-level scope at none:2
 [12] eval at .\boot.jl:319 [inlined]
 [13] eval(::Expr) at .\client.jl:389
 [14] top-level scope at .\none:3
in expression starting at C:\Users\admin\.julia\dev\LightML\src\LightML.jl:4
ERROR: Failed to precompile LightML [21c72615-c80e-5f28-8897-21b7f06a9402] to C:\Users\admin\.julia\compiled\v1.0\LightML\hSDel.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

問題分析:機器學習

  很明顯這是因爲try...catch../finally的問題學習

問題解決:ui

  定位到文件Gadfly.jl,在980行處加上catch便可,此類問題均可以這樣處理。spa

相關文章
相關標籤/搜索