Skip to content

Editable Tables examples not working #238

Description

@KeithWM

The examples that include adding rows or columns in https://dash.plotly.com/julia/datatable/editable do not appear to work when copy-pasted locally.

The error I see is

 Error: error handling request
│   exception =
│    MethodError: no method matching resize!(::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, ::Int64)
│    
│    Closest candidates are:
│      resize!(::SentinelArrays.MissingVector, ::Any)
│       @ SentinelArrays ~/.julia/packages/SentinelArrays/V85ev/src/missingvector.jl:29
│      resize!(::BitVector, ::Integer)
│       @ Base bitarray.jl:814
│      resize!(::DataFrames.DataFrame, ::Integer)
│       @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/dataframe/dataframe.jl:1073
│      ...
│    
│    Stacktrace:
│     [1] _append!(a::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, ::Base.HasLength, iter::Tuple{Dict{String, String}})
│       @ Base ./array.jl:1196
│     [2] append!(a::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, iter::Tuple{Dict{String, String}})
│       @ Base ./array.jl:1187
│     [3] push!(a::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, iter::Dict{String, String})
│       @ Base ./array.jl:1188
│     [4] (::DashForest.var"#4#13")(n_clicks::Int64, rows::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, columns::JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}})
│       @ DashForest ~/Noteneters/DashForest/src/Application.jl:44
└ @ Dash ~/.julia/packages/Dash/TRtCf/src/handler/make_handler.jl:112

I believe the line push!(rows, Dict(c.id => "" for c in columns)) may be at fault for trying to push! a dictionary onto a JSON3 object, which I presume worked previously, but is no longer supported. I would delve deeper into the issue, but I find it hard to debug the issue as I do not know how to create the objects inside the callback! function from the REPL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions