ArgumentError:在Julia中加载图像时,保留通过字典和'NamedTuple'进行广播
我正在尝试使用ArgumentError:在Julia中加载图像时,保留通过字典和'NamedTuple'进行广播,julia,Julia,我正在尝试使用图像加载图像。我得到以下错误: Error showing value of type Array{RGBA{Normed{UInt8,8}},2}: ERROR: ArgumentError: broadcasting over dictionaries and `NamedTuple`s is reserved 我打电话 julia> using FileIO julia> using Images julia> img_holder = load("zon
图像
加载图像。我得到以下错误:
Error showing value of type Array{RGBA{Normed{UInt8,8}},2}:
ERROR: ArgumentError: broadcasting over dictionaries and `NamedTuple`s is reserved
我打电话
julia> using FileIO
julia> using Images
julia> img_holder = load("zone-map.png")
Error showing value of type Array{RGBA{Normed{UInt8,8}},2}:
ERROR: ArgumentError: broadcasting over dictionaries and `NamedTuple`s is reserved
Stacktrace: etc. etc. etc.
有没有关于如何解决这个问题的想法
编辑:从这里运行示例时,我遇到了相同的错误:
那么,也许我的安装有问题?以下是完整的堆栈轨迹:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Images
[ Info: Recompiling stale cache file /Users/logankilpatrick/.julia/compiled/v1.0/Images/H8Vxc.ji for Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]
WARNING: Method definition _bcs1(Any, Any) in module Broadcast at broadcast.jl:439 overwritten in module ImageFiltering at /Users/logankilpatrick/.julia/packages/ImageFiltering/y5YkM/src/ImageFiltering.jl:28.
julia> using TestImages
julia> img = testimage("lena_gray_256")
Error showing value of type Array{Gray{Normed{UInt8,8}},2}:
ERROR: ArgumentError: broadcasting over dictionaries and `NamedTuple`s is reserved
Stacktrace:
[1] broadcastable(::Dict{String,Any}) at ./broadcast.jl:618
[2] broadcasted(::Function, ::Dict{String,Any}, ::Int64) at ./broadcast.jl:1171
[3] plotsize() at /Users/logankilpatrick/.julia/packages/Atom/W03fL/src/frontend.jl:21
[4] plotpane_io_ctx(::Base.GenericIOBuffer{Array{UInt8,1}}) at /Users/logankilpatrick/.julia/packages/Atom/W03fL/src/display/showdisplay.jl:5
[5] displayinplotpane(::Array{Gray{Normed{UInt8,8}},2}) at /Users/logankilpatrick/.julia/packages/Atom/W03fL/src/display/showdisplay.jl:68
[6] display(::Atom.JunoDisplay, ::Array{Gray{Normed{UInt8,8}},2}) at /Users/logankilpatrick/.julia/packages/Atom/W03fL/src/display/showdisplay.jl:102
[7] display(::Any) at ./multimedia.jl:287
[8] #invokelatest#1 at ./essentials.jl:697 [inlined]
[9] invokelatest at ./essentials.jl:696 [inlined]
[10] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:154
[11] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:139
[12] (::getfield(REPL, Symbol("#do_respond#40")){Bool,getfield(Atom, Symbol("##172#173")),REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:713
[13] #invokelatest#1 at ./essentials.jl:697 [inlined]
[14] invokelatest at ./essentials.jl:696 [inlined]
[15] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2273
[16] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1034
[17] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
[18] (::getfield(Base, Symbol("##718#720")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:355
[19] #invokelatest#1 at ./essentials.jl:697 [inlined]
[20] invokelatest at ./essentials.jl:696 [inlined]
[21] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:339
[22] exec_options(::Base.JLOptions) at ./client.jl:277
[23] _start() at ./client.jl:425
当Atom.jl的版本与julia客户端(Atom包)不匹配时,就会发生这种情况 当使用julia client 0.11.x时,请确保您至少在Atom.jl的v0.11.0上——一般来说,最好匹配次要版本。您还应该得到如下警告:
这看起来像一个bug-最简单的复制器可能是
rand(RGBA{Normed{UInt8,8}},1000,1000)
,但这对我来说很有效。你有旧版本的图像或颜色吗?哦,你在Atom吗?完整的堆栈跟踪实际上会有所帮助。我在原子上。[916415d5]图像v0.18.0和[5ae59095]颜色v0.9.5是版本。Atom.jl版本:[c52e3926]↑ 原子v0.8.4⇒ v0.8.5我正在运行Juliua客户端0.11.2。。。。值得注意的是,我目前还在Atom中运行Julia 1.0.3。嗯,由于您安装了其他软件包,所以您无法更新。尝试显式的pkg>addAtom@0.11.3
——这应该会告诉您还有哪些软件包阻止更新。