I work on one and the same project on two different machines (both Ubuntu, Julia 1.4). The project-related
Manifest.toml are in the project folder and I activate them before running my script. The
CSV packages are pinned to:
[336ed68f] CSV v0.6.1 ⚲
[a93c6f00] DataFrames v0.20.2 ⚲
Here is an ME:
df = CSV.read( "myfile.csv"; copycols=true, delim=';' )
On one machine it works, and on the other the following error appears
ArgumentError: provide a valid sink argument, like `using DataFrames; CSV.read(source, DataFrame)
Do you have any ideas why? Are there possibly other mismatching dependencies?
Thanks in advance.
I think you forgot to add that you want to convert the CSV data into a DataFrame.
input = CSV.read( "myfile.csv"; copycols=true, delim=';' )
df = DataFrame(input)
No, this is not the error. Newer versions of
CSV require a
OP, read the error message! It tells you how to fix your problem. do
I guess the question that OP has is why does this differ across two machines with identical Manifests?
CSV.read() without sink argument was deprecated in v0.7.0 (see here) but should have been working on 0.6 - I just went back and checked, for Julia 1.4.2 and CSV 0.6.2 I could successfully call
as you expected.
The only thing that comes to mind to explain what you’re seeing is that maybe you had CSV installed in your default environment at version 0.8 or above, and had already loaded the package before you instantiated your code? Actually speaking of which, did you use
Pkg.instantiate() to recreate the environment from the Manifest?
Thanks, exactly this was the case,… I first worked with
CSV 0.8.. I thought that
pkg"activate ." and
pkg"instantiate" are enough to “overwrite” the current setting. But this does not seem to be the case. Restarting REPL and directly instantiating my project did the job.