# For some reason a file that I am including is simply not getting loaded

**URL:** <https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113>\
**Category:** New to Julia\
**Created:** [February 25, 2020, 1:00pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113 "2020-02-25T13:00:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [February 25, 2020, 1:00pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/1 "2020-02-25T13:00:28Z")

</div>

I am trying to load a model using the ONNX package and have posted this as an issue on github here:[Could not open file model.jl · Issue #36 · FluxML/ONNX.jl · GitHub](https://github.com/FluxML/ONNX.jl/issues/36)

In short, I am trying to include a file in my directory but Julia is saying that it cannot load the file, no additional details are provided. I am sure that I am in the right directory, but the file simply doesn’t load. Has anyone had this issue?

Thanks

---

<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:** [February 25, 2020, 1:17pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/2 "2020-02-25T13:17:58Z")

</div>

I believe include loads from the directory relative to where the calling file is located at…so if you the file calling include is in /home/foo then that is where it will look for the new file. You could try using absolute paths if you don’t want to specify a relative directory.

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [February 25, 2020, 1:20pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/3 "2020-02-25T13:20:56Z")

</div>

Unfortunately I have tried this as well, whether I write “model.jl” or the full path copied in, I get the same error ☹

---

<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:** [February 25, 2020, 1:29pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/4 "2020-02-25T13:29:14Z")

</div>

> [@samantp](#):
>
> Unfortunately I have tried this as well, whether I write “model.jl” or the full path copied in, I get the same error ☹

Odd, how about something like:

```julia
include_string(@ __MODULE__ , read("model.jl", String))

```

---

<div class="post-metadata">

**Author:** ![samantp](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@samantp](https://discourse.julialang.org/u/samantp)\
**Post date:** [February 25, 2020, 1:31pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/5 "2020-02-25T13:31:48Z")

</div>

Sorry, the error is different, not the same as before! When using the absolute path I get the error  
LoadError: UndefVarError: pad=(0, 0, 1, 1) not defined  
in expression starting at /home/pratiksamant/JuliaCodes/AlexNEt/bvlc\_alexnet/model.jl:4  
top-level scope at model.jl:5  
include at boot.jl:328 [inlined]  
include\_relative(::Module, ::String) at loading.jl:1105  
include(::Module, ::String) at Base.jl:31  
include(::String) at client.jl:424  
top-level scope at LoadAlexNEt.jl:7

---

<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:** [February 25, 2020, 1:33pm UTC](https://discourse.julialang.org/t/for-some-reason-a-file-that-i-am-including-is-simply-not-getting-loaded/35113/6 "2020-02-25T13:33:38Z")

</div>

Okay so that says it’s loading the model.jl file, but that you have an error at line 4…
