Shapefile.jl
Shapefile.jl copied to clipboard
"MethodError: no method matching length(::Shapefile.Row{Shapefile.Polygon})" in Pluto.jl
Hi, I got the following error while reading a shapefile (the exact shapefile can be downloaded here) in Pluto.jl:
On the other hand, the following is obtained in the REPL:
julia> using Shapefile
julia> geotable = Shapefile.Table("SC_Municipios_2020.shp")
Shapefile.Table{Union{Missing, Shapefile.Polygon}} with 295 rows and the following 5 columns:
geometry, CD_MUN, NM_MUN, SIGLA_UF, AREA_KM2
For now, I solved the issue by suppressing the output with ;
in Pluto.jl, but is there a way to make the output work there too? (Maybe this is an issue with Pluto.jl, in which case I could open an issue there.)
Thanks for the report. It looks like Pluto calls length(::Shapefile.Row)
when showing tabular data, and this method does not exist. Rather than just adding this method, it seems the best solution is to make the Row a Tables.Abstractrow, as is suggested here: https://github.com/JuliaData/DBFTables.jl/pull/13. So first we should finish that PR, then do something similar here.