Failing to precompile CSV

I recently upgraded to Julia v 1.7.2, and the CSV package is failing to compile. The error stack is:

[ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: LoadError: MethodError: no method matching Parsers.Options(::Missing, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::Vector{String}, ::Vector{String}, ::Nothing, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool)
Closest candidates are:
  Parsers.Options(::Union{Missing, Nothing, Vector{String}}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Nothing, Char, UInt8, String}, ::Union{Char, UInt8}, ::Union{Nothing, Vector{String}}, ::Union{Nothing, Vector{String}}, ::Union{Nothing, String, Parsers.Format, Dates.DateFormat}, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/Parsers/nHfRS/src/Parsers.jl:81
  Parsers.Options(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/Parsers/nHfRS/src/Parsers.jl:59
  Parsers.Options(::Vector{String}, ::Union{Missing, Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Bool, ::Bool, ::UInt8, ::UInt8, ::Bool, ::UInt8, ::UInt8, ::UInt8, ::Union{Nothing, Tuple{Ptr{UInt8}, Int64}, UInt8}, ::UInt8, ::Union{Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Union{Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Union{Nothing, Parsers.Format}, ::Union{Nothing, Tuple{Ptr{UInt8}, Int64}}) at ~/.julia/packages/Parsers/nHfRS/src/Parsers.jl:59
Stacktrace:
  [1] CSV.Context(source::CSV.Arg, header::CSV.Arg, normalizenames::CSV.Arg, datarow::CSV.Arg, skipto::CSV.Arg, footerskip::CSV.Arg, transpose::CSV.Arg, comment::CSV.Arg, ignoreemptyrows::CSV.Arg, ignoreemptylines::CSV.Arg, select::CSV.Arg, drop::CSV.Arg, limit::CSV.Arg, buffer_in_memory::CSV.Arg, threaded::CSV.Arg, ntasks::CSV.Arg, tasks::CSV.Arg, rows_to_check::CSV.Arg, lines_to_check::CSV.Arg, missingstrings::CSV.Arg, missingstring::CSV.Arg, delim::CSV.Arg, ignorerepeated::CSV.Arg, quoted::CSV.Arg, quotechar::CSV.Arg, openquotechar::CSV.Arg, closequotechar::CSV.Arg, escapechar::CSV.Arg, dateformat::CSV.Arg, dateformats::CSV.Arg, decimal::CSV.Arg, truestrings::CSV.Arg, falsestrings::CSV.Arg, stripwhitespace::CSV.Arg, type::CSV.Arg, types::CSV.Arg, typemap::CSV.Arg, pool::CSV.Arg, downcast::CSV.Arg, lazystrings::CSV.Arg, stringtype::CSV.Arg, strict::CSV.Arg, silencewarnings::CSV.Arg, maxwarnings::CSV.Arg, debug::CSV.Arg, parsingdebug::CSV.Arg, validate::CSV.Arg, streaming::CSV.Arg)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:366
  [2] CSV.Context(source::String; header::Int64, normalizenames::Bool, datarow::Int64, skipto::Int64, footerskip::Int64, transpose::Bool, comment::Nothing, ignoreemptyrows::Bool, ignoreemptylines::Nothing, select::Nothing, drop::Nothing, limit::Nothing, buffer_in_memory::Bool, threaded::Nothing, ntasks::Nothing, tasks::Nothing, rows_to_check::Int64, lines_to_check::Nothing, missingstrings::Vector{String}, missingstring::String, delim::Nothing, ignorerepeated::Bool, quoted::Bool, quotechar::Char, openquotechar::Nothing, closequotechar::Nothing, escapechar::Char, dateformat::Nothing, dateformats::Nothing, decimal::UInt8, truestrings::Vector{String}, falsestrings::Vector{String}, stripwhitespace::Bool, type::Nothing, types::Nothing, typemap::Dict{Type, Type}, pool::Tuple{Float64, Int64}, downcast::Bool, lazystrings::Bool, stringtype::Type{InlineStrings.InlineString}, strict::Bool, silencewarnings::Bool, maxwarnings::Int64, debug::Bool, parsingdebug::Bool, validate::Bool)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:178
  [3] CSV.Context(source::String)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:178
  [4] _precompile_()
    @ CSV ~/.julia/packages/CSV/VjW8G/src/precompile.jl:7
  [5] top-level scope
    @ ~/.julia/packages/CSV/VjW8G/src/CSV.jl:95
  [6] include
    @ ./Base.jl:418 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:373 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [11] top-level scope
    @ none:1
in expression starting at /home/dsm/.julia/packages/CSV/VjW8G/src/CSV.jl:1
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to /home/dsm/.julia/compiled/v1.7/CSV/jl_iVHdWV.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

Any thoughts on what’s going wrong or how to trouble shoot this? Thanks!

Can you show the output of ]st aka what is installed in your base environment?

I was able to get it working by installing the Parsers package. I have no idea why this worked, but it was suggested in a couple of other threads.

Odd enough. The

Closest candidates are:
  Parsers.Options(...)

Part indicates that you already had a version of the Parsers package, likely as a dependency from CSV itself. Maybe there was an error in some version that you happened to have installed that is now resolved. Hard so say without knowing the package versions but I’m glad that you managed to resolve the issue quickly :slight_smile: have a nice day