# Expected "end" error while loading a module

**URL:** <https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059>\
**Category:** General Usage\
**Tags:** question, package, error, module, modules\
**Created:** [April 4, 2023, 10:58am UTC](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059 "2023-04-04T10:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sh\_166](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sh_166/32/43965_2.png) [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Post date:** [April 4, 2023, 10:58am UTC](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059/1 "2023-04-04T10:58:15Z")

</div>

I am having the following problem loading a module:

```julia
LoadError: syntax: "module" at C:\Users\shiha\LyapunovExponentsWithForwardDiff.jl:1 expected "end", got "LyapunovExponentsResult"
in expression starting at C:\Users\shiha\LyapunovExponentsWithForwardDiff.jl:9

Stacktrace:
 [1] top-level scope
   @ C:\Users\shiha\LyapunovExponentsWithForwardDiff.jl:9
 [2] include(fname::String)
   @ Base.MainInclude .\client.jl:476
 [3] top-level scope
   @ In[61]:1
 [4] eval
   @ .\boot.jl:368 [inlined]
 [5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base .\loading.jl:1428

```

The module I am trying to load is [here](https://gist.github.com/tkf/014787f386e99b7b8b42683cfbd8da01). I can’t understand where the missing “end” is.

I am trying to load the module using:

> include(“LyapunovExponentsWithForwardDiff.jl”)

Thanks in advance!!

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [April 4, 2023, 11:02am UTC](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059/2 "2023-04-04T11:02:08Z")

</div>

Apparently the notebook dates back to Julia 0.5, which is positively prehistoric. Not a surprise you get errors here and there. In particular, I see that it uses the `type` syntax to define new objects, which is now done with `struct`. Expect plenty more of these inconsistencies

---

<div class="post-metadata">

**Author:** ![Sh\_166](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sh_166/32/43965_2.png) [@Sh\_166](https://discourse.julialang.org/u/Sh_166)\
**Post date:** [April 4, 2023, 1:45pm UTC](https://discourse.julialang.org/t/expected-end-error-while-loading-a-module/97059/3 "2023-04-04T13:45:15Z")

</div>

Ah okay… I should’ve noticed. Thanks a lot.
