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

UndefVarError: writeshortest not defined #1067

Open
ahalwright opened this issue Jan 13, 2023 · 1 comment
Open

UndefVarError: writeshortest not defined #1067

ahalwright opened this issue Jan 13, 2023 · 1 comment

Comments

@ahalwright
Copy link

Example on macOS (arm64-apple-darwin21.5.0) and on Generic Linux on x86 but not Windows.

Only occurs when dataframe includes a column of floats.

This issue was reported as fixed, but it isn't fixed.

using CSV, DataFrames
dff = DataFrame(:i=>[1.2,2.0])
CSV.write(stdout,dff)
ERROR: UndefVarError: writeshortest not defined
Stacktrace:
[1] writecell(buf::Vector{UInt8}, pos::Int64, len::Int64, io::Base.TTY, x::Float64, opts::CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)})
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:444
[2] (::CSV.var"#106#107"{Vector{UInt8}, Base.RefValue{Int64}, Int64, Base.TTY, Int64, CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)}, UInt8, UInt8})(val::Float64, col::Int64, nm::Symbol)
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:371
[3] eachcolumn
@ ~/.julia/packages/Tables/pLOVV/src/utils.jl:70 [inlined]
[4] writerow(buf::Vector{UInt8}, pos::Base.RefValue{Int64}, len::Int64, io::Base.TTY, sch::Tables.Schema{(:i,), Tuple{Float64}}, row::DataFrameRow{DataFrame, DataFrames.Index}, cols::Int64, opts::CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)})
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:367
[5] (::CSV.var"#99#100"{Bool, Bool, Tables.Schema{(:i,), Tuple{Float64}}, DataFrames.DataFrameRows{DataFrame}, CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)}, Vector{UInt8}, Int64, Int64, Tuple{Symbol}})(io::Base.TTY)
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:235
[6] with(f::CSV.var"#99#100"{Bool, Bool, Tables.Schema{(:i,), Tuple{Float64}}, DataFrames.DataFrameRows{DataFrame}, CSV.Options{UInt8, UInt8, Nothing, Tuple{}, typeof(CSV._identity)}, Vector{UInt8}, Int64, Int64, Tuple{Symbol}}, io::Any, append::Bool, compress::Bool)
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:303
[7] #write#98
@ ~/.julia/packages/CSV/jFiCn/src/write.jl:225 [inlined]
[8] write(file::Base.TTY, itr::DataFrame; delim::Char, quotechar::Char, openquotechar::Nothing, closequotechar::Nothing, escapechar::Char, newline::Char, decimal::Char, dateformat::Nothing, quotestrings::Bool, missingstring::String, transform::typeof(CSV._identity), bom::Bool, append::Bool, compress::Bool, writeheader::Nothing, partition::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:210
[9] write(file::Base.TTY, itr::DataFrame)
@ CSV ~/.julia/packages/CSV/jFiCn/src/write.jl:153
[10] top-level scope
@ REPL[5]:1

versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.5.0)
CPU: 10 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
Threads: 1 on 8 virtual cores

versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 24 × AMD Ryzen 9 3900X 12-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
Threads: 1 on 24 virtual cores

@kafisatz
Copy link
Contributor

I ran into this as well just now. For reference #1065 (comment) removing/adding Parsers.jl and CSV.jl may help. In most cases the manifest should probably not contain Parsers.jl eventually.

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