Skip to content

returns SubString when should return String according to schema #133

@asinghvi17

Description

@asinghvi17

Maybe this is a DBFTables problem but try

collect(Tables.namedtupleiterator(tbl))

on any Shapefile that has a string column

it returns an error

ERROR: TypeError: in new, expected Union{Missing, String}, got a value of type SubString{String}
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/Tables/8p03y/src/namedtuples.jl:50 [inlined]
 [2] _iterate(rows::Tables.NamedTupleIterator{Tables.Schema{…}, Shapefile.Table{…}}, st::Tuple{})
   @ Tables ~/.julia/packages/Tables/8p03y/src/namedtuples.jl:41
 [3] iterate
   @ ~/.julia/packages/Tables/8p03y/src/namedtuples.jl:62 [inlined]
 [4] iterate
   @ ~/.julia/packages/Tables/8p03y/src/namedtuples.jl:61 [inlined]
 [5] copyto!(dest::Vector{@NamedTuple{…}}, src::Tables.NamedTupleIterator{Tables.Schema{…}, Shapefile.Table{…}})
   @ Base ./abstractarray.jl:934
 [6] _collect
   @ ./array.jl:722 [inlined]
 [7] collect(itr::Tables.NamedTupleIterator{Tables.Schema{…}, Shapefile.Table{…}})
   @ Base ./array.jl:716
 [8] top-level scope
   @ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.

If this is a DBFTables thing I can move it there, but something has to be done here

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