Skip to content

ERROR: UndefVarError: A not defined in local scope #1145

Open
@yakir12

Description

@yakir12

When trying to parse two csv files, I get this error:

tbl = CSV.File(files)
ERROR: UndefVarError: `A` not defined in local scope
Suggestion: check for an assignment to a local variable that shadows a global of the same name.
Stacktrace:
 [1] (::CSV.var"#3#4")(x::PooledArrays.PooledVector{Union{Missing, String3}, UInt32, Vector{UInt32}})
   @ CSV ./none:0
 [2] iterate
   @ ./generator.jl:48 [inlined]
 [3] collect(itr::Base.Generator{Vector{PooledArrays.PooledVector{Union{}, UInt32, Vector{}}}, CSV.var"#3#4"})
   @ Base ./array.jl:780
 [4] chaincolumns!(a::Any, b::Any)
   @ CSV ~/.julia/packages/CSV/XLcqT/src/utils.jl:240
 [5] CSV.File(sources::Vector{String}; source::Nothing, kw::@Kwargs{})
   @ CSV ~/.julia/packages/CSV/XLcqT/src/file.jl:936
 [6] CSV.File(sources::Vector{String})
   @ CSV ~/.julia/packages/CSV/XLcqT/src/file.jl:907
 [7] top-level scope
   @ REPL[120]:1
Some type information was truncated. Use `show(err)` to see complete types.

The files are mounted on an external hard-drive, but if I copy them locally, then everything works. Both files have empty last rows in them. If I delete those empty rows, then parsing "even" the mounted files works...

So strange...

Not sure why its complaining on the scope of that A variable, maybe due to some lazy step in ChainedVector...?

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