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

Load error with Parsers.Options #1101

Closed
erickb opened this issue Jun 26, 2023 · 4 comments
Closed

Load error with Parsers.Options #1101

erickb opened this issue Jun 26, 2023 · 4 comments

Comments

@erickb
Copy link

erickb commented Jun 26, 2023

I cannot precompile CSV v.0.10.11 using Julia v1.7.2 and Parsers v2.7.1. (I also tried downgrading to Parsers 2.5.0 but got the same error). Here is the error:

Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to C:\ProgramData\NEMO\depot\compiled\v1.7\CSV\jl_15CB.tmp.
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, ::Bool, ::Nothing)
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, ::Any, ::Any) at C:\Users\Jason\.julia\packages\Parsers\KmPKe\src\Parsers.jl:85
  Parsers.Options(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at C:\Users\Jason\.julia\packages\Parsers\KmPKe\src\Parsers.jl:61
  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, ::Any) at C:\Users\Jason\.julia\packages\Parsers\KmPKe\src\Parsers.jl:85
  ...
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, groupmark::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 C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\context.jl:444
  [2] CSV.File(source::IOBuffer; 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, groupmark::Nothing, truestrings::Vector{String}, falsestrings::Vector{String}, stripwhitespace::Bool, type::Nothing, types::Nothing, typemap::IdDict{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 C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\file.jl:222
  [3] CSV.File(source::IOBuffer)
    @ CSV C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\file.jl:222
  [4] macro expansion
    @ C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\precompile.jl:10 [inlined]
  [5] macro expansion
    @ C:\ProgramData\NEMO\depot\packages\PrecompileTools\0yi7r\src\workloads.jl:81 [inlined]
  [6] macro expansion
    @ C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\precompile.jl:7 [inlined]
  [7] top-level scope
    @ C:\ProgramData\NEMO\depot\packages\PrecompileTools\0yi7r\src\workloads.jl:136
  [8] include(mod::Module, _path::String)
    @ Base .\Base.jl:418
  [9] include(x::String)
    @ CSV C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\CSV.jl:24
 [10] top-level scope
    @ C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\CSV.jl:120
 [11] include
    @ .\Base.jl:418 [inlined]
 [12] 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
 [13] top-level scope
    @ none:1
 [14] eval
    @ .\boot.jl:373 [inlined]
 [15] eval(x::Expr)
    @ Base.MainInclude .\client.jl:453
 [16] top-level scope
    @ none:1
in expression starting at C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\precompile.jl:3
in expression starting at C:\ProgramData\NEMO\depot\packages\CSV\OnldF\src\CSV.jl:1

Note: The depot is in a nonstandard location (C:\ProgramData\NEMO\), but that has never been a problem before, including with earlier versions CSV (and in particular with CSV 2.4.)

@erickb
Copy link
Author

erickb commented Jun 29, 2023

Hello, this is blocking me and colleagues from running a program that relies on CSV files and is important to our work. Is there a version of CSV that I should revert to that does not conflict with Parsers?

Also, if the problem is not replicable that would be good to know. Our team has tried to look for conflicts with other packages but so far it seems to be solely a problem with CSV's use of Parsers.

Thank you.

@quinnj
Copy link
Member

quinnj commented Jun 29, 2023

One thing I know has happened to people in the past is somehow their editor tooling is loading, for example, the JSON package which also depends on Parsers and a certain version gets loaded. Then when CSV loads, it's the wrong version compat-wise and you get an error like you're showing. If you're on Julia 1.9, can you show the output of pkgversion(Parsers) and pkgversion(CSV)? We can also do some additional investigating, but it seems like something is out of sync from the recent groupmark support in both Parsers and CSV, so perhaps @LilithHafner may also have an idea of what's going on.

@erickb
Copy link
Author

erickb commented Jun 29, 2023

Thanks very much @quinnj. I'm on Julia 1.7, so I used Pkg.status() and get v2.7.1 for Parsers and v0.10.11 for CSV.

@erickb
Copy link
Author

erickb commented Jun 29, 2023

Thanks again for the tip @quinnj: I may have found the culprit. I'll close and reopen if this doesn't solve it.

@erickb erickb closed this as completed Jun 29, 2023
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