# Problem with file import (dir does not exist)

**URL:** <https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809>\
**Category:** New to Julia\
**Created:** [March 22, 2017, 5:09am UTC](https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809 "2017-03-22T05:09:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![souvarine](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@souvarine](https://discourse.julialang.org/u/souvarine)\
**Post date:** [March 22, 2017, 5:09am UTC](https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809/1 "2017-03-22T05:09:52Z")

</div>

Hi everybody,

Brand new to Julia, so please forgive the ignorance. I’m trying to do something simple, i.e. import a local csv file, and am running into problems:

using DataFrames;  
data = DataFrames.readtable(“C:\TempPath\test.csv”)

SystemError: opening file C:\TempPath\test.csv: No such file or directory

in #systemerror#51 at ./error.jl:34 [inlined]  
in systemerror(::String, ::Bool) at ./error.jl:34  
in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:89  
in open(::String, ::String) at ./iostream.jl:101  
in #readtable#79(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::DataFrames.#readtable, ::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:941  
in readtable(::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:930

I have been trying to follow along with blog post (i.e. [Tabular Data I/O in Julia | R-bloggers](https://www.r-bloggers.com/tabular-data-io-in-julia/)), but can’t figure out why I can’t get past the first step. I’ve tried Python literals, double \s, /s, all to no avail. I know that there must be a simple step I am overlooking…

Thank you in advance, and looking forward to your thoughts.

---

<div class="post-metadata">

**Author:** ![YongHee-Kim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yonghee-kim/32/5965_2.png) [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Post date:** [March 22, 2017, 5:14am UTC](https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809/2 "2017-03-22T05:14:41Z")

</div>

`"\"` is wrong. `\\` or `/` will work

try

```julia
DataFrames.readtable("C:\\TempPath\\test.csv")

```

or

```julia
DataFrames.readtable("C:/TempPath/test.csv")

```

---

<div class="post-metadata">

**Author:** ![souvarine](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@souvarine](https://discourse.julialang.org/u/souvarine)\
**Post date:** [March 22, 2017, 6:15am UTC](https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809/3 "2017-03-22T06:15:47Z")

</div>

> [@YongHee-Kim](#):
>
> DataFrames.readtable(“C:/TempPath/test.csv”)

Ah, so the syntax is R-like, good to know. Thank you for your help!

---

<div class="post-metadata">

**Author:** ![souvarine](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@souvarine](https://discourse.julialang.org/u/souvarine)\
**Post date:** [March 22, 2017, 6:23am UTC](https://discourse.julialang.org/t/problem-with-file-import-dir-does-not-exist/2809/4 "2017-03-22T06:23:41Z")

</div>

Unfortunately:

DataFrames.readtable(“C:/TempPath/test.csv”)  
SystemError: opening file C:/TestPath/test.csv: No such file or directory

in #systemerror#51 at ./error.jl:34 [inlined]  
in systemerror(::String, ::Bool) at ./error.jl:34  
in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:89  
in open(::String, ::String) at ./iostream.jl:101  
in #readtable#79(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::DataFrames.#readtable, ::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:941  
in readtable(::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:930

and

data = DataFrames.readtable(“C:\TempPath\test.csv”)

in #systemerror#51 at ./error.jl:34 [inlined]  
in systemerror(::String, ::Bool) at ./error.jl:34  
in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:89  
in open(::String, ::String) at ./iostream.jl:101  
in #readtable#79(::Bool, ::Char, ::Array{Char,1}, ::Char, ::Array{String,1}, ::Array{String,1}, ::Array{String,1}, ::Bool, ::Int64, ::Array{Symbol,1}, ::Array{Any,1}, ::Bool, ::Char, ::Bool, ::Int64, ::Array{Int64,1}, ::Bool, ::Symbol, ::Bool, ::Bool, ::DataFrames.#readtable, ::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:941  
in readtable(::String) at /opt/julia\_packages/.julia/v0.5/DataFrames/src/dataframe/io.jl:930

I know that the Julia console itself can read the directory:

julia\> readdir(“C:\TempPath”)  
2-element Array{String,1}:  
“newhlmdata.csv”  
“test.csv”

Oddly, the same command does not work in JuliaBox:

readdir(“C:\TempPath”)  
SystemError: unable to read directory C:\TempPath: No such file or directory

in readdir(::String) at ./file.jl:303

So, in short, still not sure what’s going on…
