Cannot include Neptune.jl

I have been unable to use the include method on Neptune.jl exclusively, below is my terminal session.

emmett@y700:~$ cd dev
emmett@y700:~/dev$ julia
   _       _ _(_)_     |  Documentation:
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official release
|__/                   |

(@v1.5) pkg> activate Neptune.jl
 Activating environment at `~/dev/Neptune.jl/Project.toml`

julia> cd("Neptune.jl/src")

julia> pwd()

julia> include("Neptune.jl")
ERROR: LoadError: MethodError: no method matching dirname(::Nothing)
Closest candidates are:
  dirname(::AbstractString) at path.jl:161
 [1] project_relative_path(::String) at /home/emmett/dev/Neptune.jl/src/Neptune.jl:15
 [2] top-level scope at /home/emmett/dev/Neptune.jl/src/Neptune.jl:17
 [3] include(::String) at ./client.jl:457
 [4] top-level scope at REPL[4]:1
in expression starting at /home/emmett/dev/Neptune.jl/src/Neptune.jl:17

julia> include(dirname("Neptune.jl"))
ERROR: could not open file /home/emmett/dev/Neptune.jl/src/
 [1] include(::String) at ./client.jl:457
 [2] top-level scope at REPL[5]:1

julia> cd("..")

julia> pwd()

julia> cd("..")

julia> cd("SuperFrames.jl/src")

julia> pwd()

julia> include("SuperFrames.jl")

julia> println("What??")

You’re creating a new folder. You need to remove the .jl in your activate.

EDIT: Oh maybe I got this wrong…

1 Like

What are the filenames in your folder


perhaps the source file is neptune.jl with a lowercase n.

No, it’s a good point

What are you trying to do? Why not just do:

] activate Neptune
using Neptune


The error you see is from executing Neptune.jl/Neptune.jl at 5f95cb444b02155d2dbdbd76e4f245896e68da20 · compleathorseplayer/Neptune.jl · GitHub, as apparently pathof a module loaded with include is not defined, hence returning nothing.


It’s just that this does not create a folder with a src/ for me, and so I can’t reproduce the error so I’m not sure… More likely that others, like @mauro3 above, know what’s going on :slight_smile:

1 Like

You could always clone the repository
git clone GitHub - emmettgb/Neptune.jl: Simple (Pluto-based) non-reactive notebooks for Julia

I have been doing so through Pkg, adding and updating – not too bad, but constant commits with any alterations…

Not it, I am of course lsing around, etc

Have you tried without the .jl as suggested by @mauro3 and myself? While the packages have the .jl extension on GitHub, I believe all your local package repositories in dev/ should appear without the .jl extension if you added or deved them.

Yes, but the environment is not so much what I am worried about, as status() and update() seem to have worked fine. The include() call is where I am getting the error, it is like the src/Neptune.jl file does not exist. Calling src/Neptune as well yields no difference as wekk of course. It is almost as if Julia is unaware that the file exists.

I mean instead of cding into dev/Neptune.jl, have you tried cding into the correct dev/Neptune?

Have you read my post above? It finds the file but then errors in the line linked to above. Apparently it is not made to be included but only loaded by using or import. Alternatively, if you must include you will need to update that line of code.