Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MethodError: no method matching length(::Shapefile.Row{Shapefile.Polygon})" in Pluto.jl #50

Open
schneiderfelipe opened this issue Mar 21, 2021 · 1 comment

Comments

@schneiderfelipe
Copy link

Hi, I got the following error while reading a shapefile (the exact shapefile can be downloaded here) in Pluto.jl:

Captura de tela de 2021-03-21 15-46-45

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.)

@visr
Copy link
Member

visr commented Mar 24, 2021

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: JuliaData/DBFTables.jl#13. So first we should finish that PR, then do something similar here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants