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

no method matching + error #543

Closed
tk3369 opened this issue Dec 8, 2019 · 1 comment
Closed

no method matching + error #543

tk3369 opened this issue Dec 8, 2019 · 1 comment

Comments

@tk3369
Copy link
Contributor

tk3369 commented Dec 8, 2019

Reading larger file via iteration over CSV.File yields error:

julia> makecsv(filename, n) = open(filename, "w") do io
           println(io,"a")
           foreach(x->println(io,x), 1:n)
       end;

julia> readcsv(filename) = let f = CSV.File(filename)
           total = 0
           for (i,row) in enumerate(f)
               total += row.a
           end
           return total
       end;

julia> makecsv("tom.csv", 1000); readcsv("tom.csv")
500500

julia> makecsv("tom.csv", 100000); readcsv("tom.csv")
ERROR: MethodError: no method matching +(::Tuple{Int64,Int64,Int64,NTuple{4,CSV.Column{Int64,Int64}}}, ::Int64)
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at operators.jl:529
  +(::Complex{Bool}, ::Real) at complex.jl:297
  +(::Missing, ::Number) at missing.jl:115
  ...
Stacktrace:
 [1] iterate(::Base.Iterators.Enumerate{CSV.File}, ::Tuple{Int64,Tuple{Int64,Int64,Int64,NTuple{4,CSV.Column{Int64,Int64}}}}) at /Users/tomkwong/.julia/packages/CSV/skXyc/src/iteration.jl:48
 [2] readcsv(::String) at ./REPL[18]:4
 [3] top-level scope at REPL[22]:1

My versions:

CSV v0.5.18

julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.0.0)
  CPU: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 4
@tk3369
Copy link
Contributor Author

tk3369 commented Dec 8, 2019

Strangely enough. I cannot replicate anymore.... Leaving issue open just in case that there's additional insight about what might have happened.

@quinnj quinnj closed this as completed Dec 12, 2019
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