LOAD_PATH includes unquoted individual entries

It seems that somehow individual entries in LOAD_PATH are not quoted:

lobianco@NCY-BETA-ALOBIANCO:~/.julia/dev/BetaML$ cd "docs/src/tutorials/A regression task: sharing bike demand prediction"
lobianco@NCY-BETA-ALOBIANCO:~/.julia/dev/BetaML/docs/src/tutorials/A regression task: sharing bike demand prediction$ julia
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0-rc2 (2021-03-11)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> activate .
  Activating environment at `~/.julia/dev/BetaML/docs/src/tutorials/A regression task: sharing bike demand prediction/Project.toml`

julia> include("betaml_tutorial_regression_sharingBikes.jl")
[ Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
ERROR: LoadError: LOAD_PATH entries cannot contain ':'
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] create_expr_cache(pkg::Base.PkgId, input::String, output::String, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1231
 [3] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1326
 [4] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1306
 [5] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1021
 [6] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [7] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901
 [8] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [9] top-level scope
   @ REPL[2]:1
in expression starting at /home/lobianco/.julia/dev/BetaML/docs/src/tutorials/A regression task: sharing bike demand prediction/betaml_tutorial_regression_sharingBikes.jl:15

Do you have spaces in the name of your project folder?

Remove them or replace them with underscores…

yes, but I thought it wasn’t needed…

Well, it is. Never use spaces in a folder name. Very easy…
Not sure if that is mentioned in the Julia manual, though…

I understand that “don’t use space” is easy… but it looks like an half bug to me… after all, this is why we have quotes :slight_smile: :slight_smile:

It doesn’t seem like spaces are the issue here, but rather that the path has a : in it. Spaces should work fine.


Thanks that you pointed that out. Nevertheless: GNU make does not work with spaces in a folder name, and Julia is using GNU make as build tool, so better avoid spaces and many other characters in any folder name. For a list of characters to avoid, see: Characters to Avoid in Directories and Filenames | UMC | Michigan Tech

1 Like

Julia only uses make if you are building Julia itself (not simply using Julia, and most users just download the binaries anyway). Spaces are pretty common in file paths on Windows and they are well-supported by Julia AFAIK.


Well, Julia is cross platform, and not all packages have binary artifacts that you can download. Even if you do not compile Julia itself building of some packages will fail if you have spaces in your file paths. Better avoid and teach Windows users that spaces are evil for open source programmers.

Usually cross-platform means it tries to work on all platforms / whatever weird setup the user has, which is kind of the opposite of saying it needs to follow the decisions of GNU make. I agree spaces in paths can cause issues, but it really seems like FUD here since as Stefan pointed out the issue is the colon, not the spaces.


As you stated correctly, the problem in the original question was a colon and not spaces. I split off a general discussion about best practice for characters in path names here: Which characters to avoid in file and path names

1 Like