# Seemingly simple error

**URL:** <https://discourse.julialang.org/t/seemingly-simple-error/5816>\
**Category:** General Usage\
**Created:** [September 11, 2017, 7:39am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816 "2017-09-11T07:39:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 11, 2017, 7:39am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/1 "2017-09-11T07:39:16Z")

</div>

I was trying to borrow some sparse QR functionality from base/sparse and base/linalg of the nightly version in v0.6. So I took base/linalg/qr.jl which is a dependency of the QR functions of base/sparse, renamed it to my\_qr.jl and wrapped the code in a module MY\_QR. Then I modified a few things here and there in the files in base/sparse to make it compatible with v0.6 and tried to call `include("sparse.jl")` from [this link](https://expirebox.com/download/d446ac444addf9a899e6f941d8a4ab8a.html), but I keep getting the error

```julia
ERROR: LoadError: LoadError: ArgumentError: Module MY_QR not found in current path.
Run `Pkg.add("MY_QR")` to install the MY_QR package.

```

when I clearly defined the module in `my_qr.jl`, included the file in `sparse.jl` and I am just trying to import the module in `spqr.jl` where the error is initiated. I find the error quite unexpected and being in one of those frozen mind moments, I thought of asking for help. So it would be nice if you can spare a few minutes and tell me what I am doing wrong here. Thanks a lot in advance!

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 11, 2017, 7:52am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/2 "2017-09-11T07:52:58Z")

</div>

Perhaps you need `using .MY_QR` instead of `using MY_QR`?

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 11, 2017, 9:21am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/3 "2017-09-11T09:21:14Z")

</div>

With that it is giving `ERROR: LoadError: LoadError: UndefVarError: MY_QR not defined`.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 11, 2017, 9:30am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/4 "2017-09-11T09:30:58Z")

</div>

`import ..MY_QR: AbstractQ` in your `spqr.jl` then.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 11, 2017, 9:36am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/5 "2017-09-11T09:36:26Z")

</div>

Yup that does the trick, thanks! Which part of the docs is relevant here btw? I can’t recall seeing that bit explained.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 11, 2017, 9:38am UTC](https://discourse.julialang.org/t/seemingly-simple-error/5816/6 "2017-09-11T09:38:07Z")

</div>

Never mind, it is 16.1.4 in [this](https://media.readthedocs.org/pdf/julia/latest/julia.pdf).
