# Can include one .jl file but not another

**URL:** <https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638>\
**Category:** New to Julia\
**Created:** [July 22, 2019, 4:13pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638 "2019-07-22T16:13:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [July 22, 2019, 4:13pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/1 "2019-07-22T16:13:13Z")

</div>

I am trying to call julia files into the file I am currently working on. I can include `Schneider et al 2016 parameter.jl` and it calculates its values, but I get an error when I try to include `Schneider et al functions harvest.jl"` and I really don’t understand why.

The include command is formatted the same way:

```julia
include("C:\\Users\\Helga\\Documents\\Julia\\Julia WD\\phd-julia-code\\Schneider et al 2016 parameters.jl")
include("C:\\Users\\Helga\\Documents\\Julia\\Julia WD\\phd-julia-code\\Schneider et al functions harvest.jl")

```

And I know the name(directory) is correct because I copied the name from the file properties. What is happening?

```julia
could not open file C:\Users\Helga\Documents\Julia\Julia WD\phd-julia-code\Schneider et al functions harvest.jl
in top-level scope at base\none
in include at base\client.jl:403
in include at base\sysimg.jl:29
in include_relative at base\loading.jl:1038
in include at base\boot.jl:326 

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 22, 2019, 5:38pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/2 "2019-07-22T17:38:45Z")

</div>

Is it possible that you misspelled the path?

---

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [July 22, 2019, 5:47pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/3 "2019-07-22T17:47:50Z")

</div>

No, I copied the filepath name and put in the double `\\`. I removed and reinstalled Julia in case some weird error was causing it, but it still doesn’t work. I really am confused as to why its not working.

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [July 22, 2019, 6:26pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/4 "2019-07-22T18:26:02Z")

</div>

You can check if the path is correct using `isfile`. If it is then it’s another problem. Do you use the REPL ? recently I had some paths that didn’t work in Juno.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [July 22, 2019, 6:40pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/5 "2019-07-22T18:40:44Z")

</div>

What is the output of `stat("C:\\Users\\Helga\\Documents\\Julia\\Julia WD\\phd-julia-code\\Schneider et al functions harvest.jl")`?

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [July 22, 2019, 6:49pm UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/6 "2019-07-22T18:49:48Z")

</div>

I would try renaming “Schneider et al functions harvest.jl” to file2.jl and try including that. If that works, then the file is fine, so rename it back and try again. The renaming processes would also help ensure that the file name is really what you expect it to be…My guess is that it has a double space or maybe a non ascii character that you are not noticing.

---

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [July 23, 2019, 7:58am UTC](https://discourse.julialang.org/t/can-include-one-jl-file-but-not-another/26638/7 "2019-07-23T07:58:40Z")

</div>

Thanks for your help everyone! The typical error of staring too long at something 🙃
