# ERROR: KeyError: key OpenStreetMapX \[5c67c38e-c187-11e8-2be6-e3a6a3a5610f\] not found

**URL:** <https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275>\
**Category:** General Usage\
**Created:** [February 27, 2019, 7:24pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275 "2019-02-27T19:24:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 7:24pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/1 "2019-02-27T19:24:25Z")

</div>

I’m using Julia 1.0.3. The following is the code.

```julia
julia> using OpenStreetMapX

julia> m=get_map_data("output.osm")
ERROR: KeyError: key OpenStreetMapX [5c67c38e-c187-11e8-2be6-e3a6a3a5610f] not found
Stacktrace:
 [1] getindex at ./dict.jl:478 [inlined]
 [2] root_module at ./loading.jl:898 [inlined]
 [3] deserialize_module(::Serialization.Serializer{IOStream}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:870
 [4] handle_deserialize(::Serialization.Serializer{IOStream}, ::Int32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:775
 [5] deserialize(::Serialization.Serializer{IOStream}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:711
 [6] deserialize_datatype(::Serialization.Serializer{IOStream}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:1094
 [7] handle_deserialize(::Serialization.Serializer{IOStream}, ::Int32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:751
 [8] deserialize(::Serialization.Serializer{IOStream}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:711
 [9] handle_deserialize(::Serialization.Serializer{IOStream}, ::Int32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:758
 [10] deserialize(::Serialization.Serializer{IOStream}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:711
 [11] handle_deserialize(::Serialization.Serializer{IOStream}, ::Int32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:801
 [12] deserialize(::Serialization.Serializer{IOStream}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:711
 [13] deserialize at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Serialization/src/Serialization.jl:708 [inlined]
 [14] #get_map_data#3(::Set{Int64}, ::Bool, ::Bool, ::Function, ::String, ::Nothing) at /home/devel/.julia/packages/OpenStreetMapX/9N97K/src/parseMap.jl:95
 [15] get_map_data at /home/devel/.julia/packages/OpenStreetMapX/9N97K/src/parseMap.jl:88 [inlined] (repeats 2 times)
 [16] top-level scope at none:0

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 7 entries:
  "Juno" => v"0.5.3"
  "OpenStreetMapX" => v"0.1.5"
  "IJulia" => v"1.14.1"
  "Plots" => v"0.22.5"
  "Atom" => v"0.7.12"
  "PyCall" => v"1.18.5"
  "OpenStreetMapXPlot" => v"0.1.2"

```

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 7:26pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/2 "2019-02-27T19:26:02Z")

</div>

@pszufe

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 27, 2019, 7:29pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/3 "2019-02-27T19:29:45Z")

</div>

Hi I anticipated this error and just answered in a separate thread. But maybe someone can comment on my comment 🙂

I have registered OpenStreetMapX as an official Julia package. In the registration process I was forced to change package ID to the one assigned in the registration process (package id in the form `d3d4fdd0-c191-11e8-3358-a3629b56487d` ). Now I am getting feedback from people who have problem updating their OpenStreetMapX version.

The solution that seems to work is to remove the package and then install it again (maybe there is a more elegant solution but I do not know it):  
Press `]` to go to the package manager:

```julia
(v1.0) pkg> rm OpenStreetMapXPlot

(v1.0) pkg> rm OpenStreetMapX

(v1.0) pkg> add OpenStreetMapX

(v1.0) pkg> add https://github.com/pszufe/OpenStreetMapXPlot.jl

```

Maybe there is a better approach?

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 7:39pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/4 "2019-02-27T19:39:00Z")

</div>

I believe it’s the same person. 😉

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 7:44pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/5 "2019-02-27T19:44:14Z")

</div>

it does not work. crying…the same error as earlier.

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 7:46pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/6 "2019-02-27T19:46:52Z")

</div>

```julia
julia> using OpenStreetMapX

julia> m=get_map_data("/home/devel/Desktop/output.osm")
ERROR: KeyError: key OpenStreetMapX [5c67c38e-c187-11e8-2be6-e3a6a3a5610f] not found

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 7 entries:
  "Juno" => v"0.5.3"
  "OpenStreetMapX" => v"0.1.5"
  "IJulia" => v"1.14.1"
  "Plots" => v"0.22.5"
  "Atom" => v"0.7.12"
  "PyCall" => v"1.18.5"
  "OpenStreetMapXPlot" => v"0.1.2"

(v1.0) pkg> rm OpenStreetMapXPlot
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d3d4fdd0] - OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b964fa9f] - LaTeXStrings v1.0.3
  [d3d4fdd0] - OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  [d330b81b] - PyPlot v2.7.0

(v1.0) pkg> rm OpenStreetMapX
  Updating `~/.julia/environments/v1.0/Project.toml`
  [86cd37e6] - OpenStreetMapX v0.1.5 #master (https://github.com/pszufe/OpenStreetMapX.jl)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [ec485272] - ArnoldiMethod v0.0.4
  [d25df0c9] - Inflate v0.1.1
  [522f3ed2] - LibExpat v0.5.0
  [093fc24a] - LightGraphs v1.2.0
  [86cd37e6] - OpenStreetMapX v0.1.5 #master (https://github.com/pszufe/OpenStreetMapX.jl)
  [699a6c99] - SimpleTraits v0.8.0

(v1.0) pkg> add OpenStreetMapX
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
  [86cd37e6] + OpenStreetMapX v0.1.5
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [ec485272] + ArnoldiMethod v0.0.4
  [d25df0c9] + Inflate v0.1.1
  [522f3ed2] + LibExpat v0.5.0
  [093fc24a] + LightGraphs v1.2.0
  [86cd37e6] + OpenStreetMapX v0.1.5
  [699a6c99] + SimpleTraits v0.8.0

(v1.0) pkg> add https://github.com/pszufe/OpenStreetMapXPlot.jl
  Updating git-repo `https://github.com/pszufe/OpenStreetMapXPlot.jl`
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d3d4fdd0] + OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b964fa9f] + LaTeXStrings v1.0.3
  [d3d4fdd0] + OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  [d330b81b] + PyPlot v2.7.0

julia> 

Julia has exited. Press Enter to start a new session.
Starting Julia...
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> 

julia> 

julia> 

julia> using OpenStreetMapX
[Info: Recompiling stale cache file /home/devel/.julia/compiled/v1.0/OpenStreetMapX/3fbUy.ji for OpenStreetMapX [86cd37e6-c0ff-550b-95fe-21d72c8d4fc9]

julia> m=OpenStreetMapX.get_map_data("/home/devel/Desktop/output.osm")
ERROR: KeyError: key OpenStreetMapX [5c67c38e-c187-11e8-2be6-e3a6a3a5610f] not found

```

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 27, 2019, 7:52pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/7 "2019-02-27T19:52:40Z")

</div>

In that case:

1. go to the folder where Julia stores your packages (it is either defined by your `JULIA_DEPOT_PATH` system variable or is usually simply `~/.julia`)
2. Delete folders: `packages/OpenStreetMapXPlot` and `packages/OpenStreetMapX`
3. Reinstall the packages

Again this is kind of ugly solution…

P.S.  
I propose that you edit your post and delete those long StackTraces because this must be some standard problem and probably they not help yet make thread hard to read for others.

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 8:02pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/8 "2019-02-27T20:02:34Z")

</div>

where to find the installed packages for Linux?

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 8:06pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/9 "2019-02-27T20:06:33Z")

</div>

```julia
Pkg.dir("somepackage")

```

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 8:27pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/10 "2019-02-27T20:27:03Z")

</div>

I tried this, but sadly, did not work.  
So after I delete the folders, I tried the step 3 to reinstall the packages, got the following error.

```julia
 | | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.0) pkg> 

(v1.0) pkg> add OpenStreetMapX
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: path /home/devel/.julia/packages/OpenStreetMapXPlot/As5Bc for package OpenStreetMapXPlot no longer exists. Remove the package or `develop` it at a new path

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 7 entries:
  "Juno" => v"0.5.3"
  "OpenStreetMapX" => v"0.1.5"
  "IJulia" => v"1.14.1"
  "Plots" => v"0.22.5"
  "Atom" => v"0.7.12"
  "PyCall" => v"1.18.5"
  "OpenStreetMapXPlot" => v"0.1.2"

```

So, I did the following.

```julia
(v1.0) pkg> rm OpenStreetMapX
  Updating `~/.julia/environments/v1.0/Project.toml`
  [86cd37e6] - OpenStreetMapX v0.1.5
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]

(v1.0) pkg> rm OpenStreetMapXPlot
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d3d4fdd0] - OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [ec485272] - ArnoldiMethod v0.0.4
  [d25df0c9] - Inflate v0.1.1
  [b964fa9f] - LaTeXStrings v1.0.3
  [522f3ed2] - LibExpat v0.5.0
  [093fc24a] - LightGraphs v1.2.0
  [86cd37e6] - OpenStreetMapX v0.1.5
  [d3d4fdd0] - OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  [d330b81b] - PyPlot v2.7.0
  [699a6c99] - SimpleTraits v0.8.0

(v1.0) pkg> Pkg.installed()
ERROR: expected command. instead got [Pkg.installed()]

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 5 entries:
  "Juno" => v"0.5.3"
  "IJulia" => v"1.14.1"
  "Plots" => v"0.22.5"
  "Atom" => v"0.7.12"
  "PyCall" => v"1.18.5"

(v1.0) pkg> add OpenStreetMapX
 Resolving package versions...
 Installed OpenStreetMapX ─ v0.1.5
  Updating `~/.julia/environments/v1.0/Project.toml`
  [86cd37e6] + OpenStreetMapX v0.1.5
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [ec485272] + ArnoldiMethod v0.0.4
  [d25df0c9] + Inflate v0.1.1
  [522f3ed2] + LibExpat v0.5.0
  [093fc24a] + LightGraphs v1.2.0
  [86cd37e6] + OpenStreetMapX v0.1.5
  [699a6c99] + SimpleTraits v0.8.0

(v1.0) pkg> add https://github.com/pszufe/OpenStreetMapXPlot.jl
  Updating git-repo `https://github.com/pszufe/OpenStreetMapXPlot.jl`
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d3d4fdd0] + OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b964fa9f] + LaTeXStrings v1.0.3
  [d3d4fdd0] + OpenStreetMapXPlot v0.1.2 #master (https://github.com/pszufe/OpenStreetMapXPlot.jl)
  [d330b81b] + PyPlot v2.7.0

julia> 

Julia has exited. Press Enter to start a new session.
Starting Julia...
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using OpenStreetMapX
[Info: Recompiling stale cache file /home/devel/.julia/compiled/v1.0/OpenStreetMapX/3fbUy.ji for OpenStreetMapX [86cd37e6-c0ff-550b-95fe-21d72c8d4fc9]

julia> m=OpenStreetMapX.get_map_data("/home/devel/Desktop/output.osm")
ERROR: KeyError: key OpenStreetMapX [5c67c38e-c187-11e8-2be6-e3a6a3a5610f] not found

```

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 27, 2019, 8:30pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/11 "2019-02-27T20:30:26Z")

</div>

great seems we are one step ahead - the only problem is with the remaining binaries that Julia is trying to use.

remove  
~/.julia/compiled/v1.0/OpenStreetMapXPlot  
~/.julia/compiled/v1.0/OpenStreetMapX

and try again 🙂

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 27, 2019, 8:33pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/12 "2019-02-27T20:33:40Z")

</div>

And still there is `~/.julia/environments/v1.0` but I never needed to manipulate those files there…

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 27, 2019, 10:06pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/13 "2019-02-27T22:06:47Z")

</div>

You mean remove this file also, right?

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 27, 2019, 10:23pm UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/14 "2019-02-27T22:23:01Z")

</div>

it is always possible to remove the entire .julia and reinstall all packages

did you manage to get it working?

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 28, 2019, 9:08am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/15 "2019-02-28T09:08:45Z")

</div>

Hi, pszufe,  
I removed all the packages installed via `rm packageName` under the pkg mode in my atom REPL.  
Then, I removed the entire .julia folder.  
Then, I reinstalled the OpenStreetMapX and OpenStreetMapXPlot package using

```julia
(v1.0) pkg> add OpenStreetMapX

(v1.0) pkg> add https://github.com/pszufe/OpenStreetMapXPlot.jl

```

Then, the following is part of what has happened. Forgive me for this long posting. I can edit it later if necessary.

```julia

Starting Julia...
[Info: Precompiling Atom [c52e3926-4ff0-5f6e-af25-54175e0327b1]
              _
  _ _ _(_)_ | Documentation: https://docs.julialang.org
 (_) | (_) (_) |
  _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
 | | | | | | |/ _` | |
 | | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
_/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> 

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 4 entries:
 "Juno" => v"0.5.4"
 "OpenStreetMapX" => v"0.1.5"
 "Atom" => v"0.7.14"
 "OpenStreetMapXPlot" => v"0.1.2"

julia> using OpenStreetMapX
[Info: Precompiling OpenStreetMapX [86cd37e6-c0ff-550b-95fe-21d72c8d4fc9]

julia> using OpenStreetMapXPlot
[Info: Precompiling OpenStreetMapXPlot [d3d4fdd0-c191-11e8-3358-a3629b56487d]
ERROR: LoadError: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.

PyCall is currently configured to use the Python version at:

/usr/bin/python3

and you should use whatever mechanism you usually use (apt-get, pip, conda,
etcetera) to install the Python package containing the matplotlib module.

One alternative is to re-configure PyCall to use a different Python
version on your system: set ENV["PYTHON"] to the path/name of the python
executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.

Another alternative is to configure PyCall to use a Julia-specific Python
distribution via the Conda.jl package (which installs a private Anaconda
Python distribution), which has the advantage that packages can be installed
and kept up-to-date via Julia. As explained in the PyCall documentation,
set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
To install the matplotlib module, you can use `pyimport_conda("matplotlib", PKG)`,
where PKG is the Anaconda package the contains the module matplotlib,
or alternatively you can use the Conda package directly (via
`using Conda` followed by `Conda.add` etcetera).

) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'matplotlib'",)

Stacktrace:
[1] pyimport(::String) at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:537
[2] pyimport_conda(::String, ::String, ::String) at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:695
[3] pyimport_conda at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:694 [inlined]
[4] __init__ () at /home/devel/.julia/packages/PyPlot/mQXSC/src/init.jl:174
[5] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:633
[6] _require_from_serialized(::String) at ./loading.jl:684
[7] _require(::Base.PkgId) at ./loading.jl:967
[8] require(::Base.PkgId) at ./loading.jl:858
[9] require(::Module, ::Symbol) at ./loading.jl:853
[10] include at ./boot.jl:317 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1044
[12] include(::Module, ::String) at ./sysimg.jl:29
[13] top-level scope at none:2
[14] eval at ./boot.jl:319 [inlined]
[15] eval(::Expr) at ./client.jl:393
[16] top-level scope at ./none:3
during initialization of module PyPlot
in expression starting at /home/devel/.julia/packages/OpenStreetMapXPlot/As5Bc/src/OpenStreetMapXPlot.jl:6
ERROR: Failed to precompile OpenStreetMapXPlot [d3d4fdd0-c191-11e8-3358-a3629b56487d] to /home/devel/.julia/compiled/v1.0/OpenStreetMapXPlot/EiJFN.ji.
Stacktrace:
[1] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[2] _require(::Base.PkgId) at ./loading.jl:960
[3] require(::Base.PkgId) at ./loading.jl:858
[4] require(::Module, ::Symbol) at ./loading.jl:853

(v1.0) pkg> add PyCall
Resolving package versions...
 Updating `~/.julia/environments/v1.0/Project.toml`
 [438e738f] + PyCall v1.90.0
 Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]

julia> 

julia> using OpenStreetMapXPlot
[Info: Precompiling OpenStreetMapXPlot [d3d4fdd0-c191-11e8-3358-a3629b56487d]
ERROR: LoadError: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.

PyCall is currently configured to use the Python version at:

/usr/bin/python3

and you should use whatever mechanism you usually use (apt-get, pip, conda,
etcetera) to install the Python package containing the matplotlib module.

One alternative is to re-configure PyCall to use a different Python
version on your system: set ENV["PYTHON"] to the path/name of the python
executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.

Another alternative is to configure PyCall to use a Julia-specific Python
distribution via the Conda.jl package (which installs a private Anaconda
Python distribution), which has the advantage that packages can be installed
and kept up-to-date via Julia. As explained in the PyCall documentation,
set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
To install the matplotlib module, you can use `pyimport_conda("matplotlib", PKG)`,
where PKG is the Anaconda package the contains the module matplotlib,
or alternatively you can use the Conda package directly (via
`using Conda` followed by `Conda.add` etcetera).

) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'matplotlib'",)

Stacktrace:
[1] pyimport(::String) at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:537
[2] pyimport_conda(::String, ::String, ::String) at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:695
[3] pyimport_conda at /home/devel/.julia/packages/PyCall/RQjD7/src/PyCall.jl:694 [inlined]
[4] __init__ () at /home/devel/.julia/packages/PyPlot/mQXSC/src/init.jl:174
[5] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:633
[6] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:713
[7] _require(::Base.PkgId) at ./loading.jl:937
[8] require(::Base.PkgId) at ./loading.jl:858
[9] require(::Module, ::Symbol) at ./loading.jl:853
[10] include at ./boot.jl:317 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1044
[12] include(::Module, ::String) at ./sysimg.jl:29
[13] top-level scope at none:2
[14] eval at ./boot.jl:319 [inlined]
[15] eval(::Expr) at ./client.jl:393
[16] top-level scope at ./none:3
during initialization of module PyPlot
in expression starting at /home/devel/.julia/packages/OpenStreetMapXPlot/As5Bc/src/OpenStreetMapXPlot.jl:6
ERROR: Failed to precompile OpenStreetMapXPlot [d3d4fdd0-c191-11e8-3358-a3629b56487d] to /home/devel/.julia/compiled/v1.0/OpenStreetMapXPlot/EiJFN.ji.
Stacktrace:
[1] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[2] _require(::Base.PkgId) at ./loading.jl:960
[3] require(::Base.PkgId) at ./loading.jl:858
[4] require(::Module, ::Symbol) at ./loading.jl:853

julia> using Pkg

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 5 entries:
 "Juno" => v"0.5.4"
 "OpenStreetMapX" => v"0.1.5"
 "Atom" => v"0.7.14"
 "PyCall" => v"1.90.0"
 "OpenStreetMapXPlot" => v"0.1.2"

julia> ENV["PYTHON"]="/home/devel/anaconda3/bin/python"
"/home/devel/anaconda3/bin/python"

julia> Pkg.build("PyCall")
 Building Conda ─→ `~/.julia/packages/Conda/CpuvI/deps/build.log`
 Building PyCall → `~/.julia/packages/PyCall/RQjD7/deps/build.log`

julia> 

Julia has exited. Press Enter to start a new session.
Starting Julia...
              _
  _ _ _(_)_ | Documentation: https://docs.julialang.org
 (_) | (_) (_) |
  _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
 | | | | | | |/ _` | |
 | | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
_/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using OpenStreetMapX

julia> using OpenStreetMapXPlot
[Info: Precompiling OpenStreetMapXPlot [d3d4fdd0-c191-11e8-3358-a3629b56487d]
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│ caller = __init__ () at init.jl:175
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:175
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:73
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:73
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:129
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:129
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:142
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:142
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:189
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:189
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:191
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:191
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:192
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:192
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:193
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:193
┌ Warning: `setindex!(o::PyObject, v, s::Union{Symbol, AbstractString})` is deprecated in favor of `setproperty!(o, s, v)`.
│ caller = __init__ () at init.jl:194
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:194
┌ Warning: `setindex!(o::PyObject, v, s::Union{Symbol, AbstractString})` is deprecated in favor of `setproperty!(o, s, v)`.
│ caller = __init__ () at init.jl:195
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:195
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:45
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:45
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:47
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:47
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:49
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:49
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:50
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:50
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:52
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:52
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:53
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:53
┌ Warning: `getindex(o::PyObject, s::Symbol)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o.s` instead of `o[:s]`.
│ caller = __init__ () at init.jl:175
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:175
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:73
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:73
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:129
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:129
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = find_backend(::PyCall.PyObject) at init.jl:142
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:142
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:189
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:189
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:191
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:191
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:192
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:192
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:193
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:193
┌ Warning: `setindex!(o::PyObject, v, s::Union{Symbol, AbstractString})` is deprecated in favor of `setproperty!(o, s, v)`.
│ caller = __init__ () at init.jl:194
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:194
┌ Warning: `setindex!(o::PyObject, v, s::Union{Symbol, AbstractString})` is deprecated in favor of `setproperty!(o, s, v)`.
│ caller = __init__ () at init.jl:195
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:195
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:204
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:204
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = __init__ () at init.jl:205
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/init.jl:205
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:45
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:45
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:47
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:47
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:49
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:49
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:50
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:50
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:52
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:52
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = init_colormaps() at colormaps.jl:53
└ @ PyPlot ~/.julia/packages/PyPlot/mQXSC/src/colormaps.jl:53
┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`.
│ caller = top-level scope at none:0
└ @ Core none:0

julia> m=get_map_data("/home/devel/Desktop/output.osm")
ERROR: KeyError: key OpenStreetMapX [5c67c38e-c187-11e8-2be6-e3a6a3a5610f] not found

```

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 28, 2019, 9:24am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/16 "2019-02-28T09:24:08Z")

</div>

The package id of OpenStreetMapX is `86cd37e6-c0ff-550b-95fe-21d72c8d4fc9` and is NOT `5c67c38e-c187-11e8-2be6-e3a6a3a5610f`.  
You must still have wrong files in your Julia installation.  
Your Python problem also indicate using some old configuration because normally Anaconda is used py Julia, not the system Python.

Looking in the logs I would say that you have not deleted the `.julia` folder or you are using a Julia installation that points to another `JULIA_DEPOT_PATH` folder.

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 28, 2019, 9:34am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/17 "2019-02-28T09:34:02Z")

</div>

I have all Julia 0.6, Julia 0.7, and Julia 1.0 installed. I double checked the .julia folder in my home directory and did not find it. So I thought I had deleted it…

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 28, 2019, 9:35am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/18 "2019-02-28T09:35:31Z")

</div>

So, How to find this `JULIA_DEPOT_PATH` folder? I’m using Linux Ubuntu.

---

<div class="post-metadata">

**Author:** ![pszufe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pszufe/32/23452_2.png) [@pszufe](https://discourse.julialang.org/u/pszufe)\
**Post date:** [February 28, 2019, 9:42am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/19 "2019-02-28T09:42:04Z")

</div>

OpenStreetMapX uses Julia 1.0

```julia
mkdir /home/user/Jula1.0pkg
export JULIA_DEPOT_PATH=/home/user/Jula1.0pkg
/path/to/julia

```

I cheked that the package id `5c67c38e-c187-11e8-2be6-e3a6a3a5610f` does not exist in github repos (neither OpenStreetMapX nor OpenStreetMapX). It is somewhere on your disk and the Julia you try to run is using this configuration. Maybe find the file that holds it and than you locate your broken configuration?  
In particular I remember having issues running both 0.7 and 1.0 without rigouriosly managing package locations through `JULIA_DEPOT_PATH`

---

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [February 28, 2019, 9:59am UTC](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275/20 "2019-02-28T09:59:07Z")

</div>

Thank you so much for the kind help. So how to find the package with id `5c67c38e-c187-11e8-2be6-e3a6a3a5610f`? If I do not need this package, I can simply delete/remove it. I just install Julia 1.0.3 like two days ago. I do not have other packages, besides `Juno, OpenStreetMapX, Atom, PyCall, OpenStreetMapXPlot` installed at all.

[Next page](https://discourse.julialang.org/t/error-keyerror-key-openstreetmapx-5c67c38e-c187-11e8-2be6-e3a6a3a5610f-not-found/21275.md?page=2)
