# Failing to precompile CSV

**URL:** <https://discourse.julialang.org/t/failing-to-precompile-csv/79850>\
**Category:** General Usage\
**Tags:** precompilation, csv\
**Created:** [April 22, 2022, 3:24pm UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850 "2022-04-22T15:24:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JedPhillips](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@JedPhillips](https://discourse.julialang.org/u/JedPhillips)\
**Post date:** [April 22, 2022, 3:24pm UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850/1 "2022-04-22T15:24:32Z")

</div>

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

```julia
[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!

---

<div class="post-metadata">

**Author:** ![FPGro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fpgro/32/20822_2.png) [@FPGro](https://discourse.julialang.org/u/FPGro)\
**Post date:** [April 22, 2022, 4:02pm UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850/2 "2022-04-22T16:02:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JedPhillips](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@JedPhillips](https://discourse.julialang.org/u/JedPhillips)\
**Post date:** [April 24, 2022, 7:59am UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850/3 "2022-04-24T07:59:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FPGro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fpgro/32/20822_2.png) [@FPGro](https://discourse.julialang.org/u/FPGro)\
**Post date:** [April 24, 2022, 8:38am UTC](https://discourse.julialang.org/t/failing-to-precompile-csv/79850/4 "2022-04-24T08:38:36Z")

</div>

Odd enough. The

```julia
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 🙂 have a nice day
