Hi!
I’m new to Julia & don’t understand why when using ‘~’ to specify start of my filepath, FileIO.load() gives a
Load Error:
using FileIO, CSVFiles, DataFrames
obj1 = load("~/Desktop/solar power by country.csv")
obj1 = load("~/Desktop/solar power by country.csv")
ERROR: LoadError: ArgumentError: No file exists at given path: ~/Desktop/solar power by country.csv
Stacktrace:
[1] checkpath_load
@ ~/.julia/packages/FileIO/u9YLx/src/loadsave.jl:167 [inlined]
[2] load(::String; options::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ FileIO ~/.julia/packages/FileIO/u9YLx/src/loadsave.jl:110
[3] load(::String)
@ FileIO ~/.julia/packages/FileIO/u9YLx/src/loadsave.jl:110
[4] top-level scope
@ Untitled-1:3
in expression starting at Untitled-1:3
But neither the ./filepath or absolute path gives that error:
obj2 = load("./Desktop/solar power by country.csv")
obj3 = load("/home/srikrishna/Desktop/solar power by country.csv")
Am I missing something in my understanding? This is in VS code.
In Jupyter ~ automatically turns into /home/srikrishna.
Thanks!