# Error while installing and using GlobalEnergyGIS package - syntax error?

**URL:** <https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [June 26, 2022, 5:27am UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349 "2022-06-26T05:27:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moda](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@moda](https://discourse.julialang.org/u/moda)\
**Post date:** [June 26, 2022, 5:27am UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/1 "2022-06-26T05:27:48Z")

</div>

Error while installing and using GlobalEnergyGIS package - syntax error?

As it is rather urgent, whoever helps to solve and download the data will get $50 through Venmo, thank you very much!!! 😇  
My ultimate goal is to employ this package and download the capacity factors for wind and PV for 8760 hours in a given year.

The following error has occurred and I do not know what to do to resolve it.

The julia package is located at [GlobalEnergyGIS](https://github.com/niclasmattsson/GlobalEnergyGIS)

```julia
julia> using InteractiveUtils; versioninfo()
Julia Version 1.6.6
Commit b8708f954a (2022-03-28 07:17 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 7 5800H with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, generic)
Environment:
  JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia

```

```julia
julia> using Pkg; Pkg.status()
      Status `C:\Users\Administrator\.julia\environments\v1.6\Project.toml`
  [ec485272] ArnoldiMethod v0.2.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.9
  [5ae59095] Colors v0.12.8
  [d38c429a] Contour v0.5.7
  [150eb455] CoordinateTransformations v0.6.2
  [663a7486] FreeTypeAbstraction v0.9.9
  [28b8d3ca] GR v0.64.4
  [db073c08] GeoMakie v0.2.2
  [31bfc850] GlobalEnergyGIS v0.1.0 `https://github.com/niclasmattsson/GlobalEnergyGIS#master`
  [a09fc81d] ImageCore v0.9.4
  [51556ac3] ImageDistances v0.2.15
  [6a3955dd] ImageFiltering v0.7.1
  [4e3cecfd] ImageShow v0.3.6
  [916415d5] Images v0.25.2
  [a98d9a8b] Interpolations v0.13.6
  [652e05fd] JuliaZH v1.6.0
  [b8a86587] NearestNeighbors v0.4.11
  [f57f5aa1] PNGFiles v0.3.16
  [9a7e659c] Proj4 v0.7.6
  [94ee1d12] Quaternions v0.5.6
  [dee08c22] RegionTrees v0.3.2
  [6038ab10] Rotations v1.3.1
  [0775deef] SoftPosit v0.5.0
  [4c63d2b9] StatsFuns v0.9.18
  [09ab397b] StructArrays v0.6.11
  [009559a3] XGBoost v1.5.2

```

**Errors that occur**

```julia
julia> using GlobalEnergyGIS
[Info: Precompiling GlobalEnergyGIS [31bfc850-377e-11e9-327a-adf9289f3a6c]
ERROR: LoadError: LoadError: syntax: invalid syntax &smallregions around C:\Users\Administrator.julia\packages\GlobalEnergyGIS\rQD8B\src\readclimatedata.jl:203
Stacktrace:
[1] top-level scope
@ C:\Users\Administrator.julia\packages\GlobalEnergyGIS\rQD8B\src\readclimatedata.jl:193
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:384
[3] include(x::String)
@ GlobalEnergyGIS C:\Users\Administrator.julia\packages\GlobalEnergyGIS\rQD8B\src\GlobalEnergyGIS.jl:1
[4] top-level scope
@ C:\Users\Administrator.julia\packages\GlobalEnergyGIS\rQD8B\src\GlobalEnergyGIS.jl:31
[5] include
@ .\Base.jl:384 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base .\loading.jl:1235
[7] top-level scope
@ none:1
[8] eval
@ .\boot.jl:360 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[10] top-level scope
ERROR: Failed to precompile GlobalEnergyGIS [31bfc850-377e-11e9-327a-adf9289f3a6c] to C:\Users\Administrator.julia\compiled\v1.6\GlobalEnergyGIS\jl_144.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
@ Base .\loading.jl:1385
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1329
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1043
[5] require(uuidkey::Base.PkgId)
@ Base .\loading.jl:936
[6] require(into::Module, mod::Symbol)
@ Base .\loading.jl:923

```

My Email is wz1992@seas.harvard.edu

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 26, 2022, 7:05am UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/2 "2022-06-26T07:05:27Z")

</div>

Is it possible that you have some versioning issues with dependencies? I just successfully installed the package:

```julia
(jl_ukUFRl) pkg> add https://github.com/niclasmattsson/GlobalEnergyGIS
(....)

(jl_ukUFRl) pkg> st
      Status `/tmp/jl_ukUFRl/Project.toml`
  [31bfc850] GlobalEnergyGIS v0.1.0 `https://github.com/niclasmattsson/GlobalEnergyGIS#master`

julia> using GlobalEnergyGIS

julia> 

```

This is on Julia 1.7, so maybe first try adding the package to a new environment in 1.6 and if that fails try 1.7. Also I’m on Linux, but that shouldn’t matter for a syntax error.

---

<div class="post-metadata">

**Author:** ![moda](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@moda](https://discourse.julialang.org/u/moda)\
**Post date:** [June 26, 2022, 9:14pm UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/3 "2022-06-26T21:14:31Z")

</div>

thanks a lot, it was fixed by

> ENV[“JULIA\_PKG\_PRECOMPILE\_AUTO”]=10

and have new error:

> (@v1.6) pkg\> add [GitHub - niclasmattsson/GlobalEnergyGIS: Generates input data for energy models on renewable energy in arbitrary world regions using public datasets. Written in Julia 1.x.](https://github.com/niclasmattsson/GlobalEnergyGIS)  
> Updating git-repo `https://github.com/niclasmattsson/GlobalEnergyGIS`  
> Resolving package versions…  
> ERROR: Unsatisfiable requirements detected for package StaticArrays [90137ffa]:  
> StaticArrays [90137ffa] log:  
> ├─possible versions are: 0.8.0-1.5.0 or uninstalled  
> ├─restricted to versions \* by an explicit requirement, leaving only versions 0.8.0-1.5.0  
> ├─restricted by compatibility requirements with InverseDistanceWeighting [6a8e3230] to versions: 0.8.3-0.12.5  
> │ └─InverseDistanceWeighting [6a8e3230] log:  
> │ ├─possible versions are: 0.2.0-0.4.2 or uninstalled  
> │ └─restricted to versions \* by an explicit requirement, leaving only versions 0.2.0-0.4.2  
> └─restricted by compatibility requirements with Proj4 [9a7e659c] to versions: 1.0.0-1.5.0 — no versions left  
> └─Proj4 [9a7e659c] log:  
> ├─possible versions are: 0.4.0-0.7.6 or uninstalled  
> └─restricted to versions 0.7.5-0.7 by GlobalEnergyGIS [31bfc850], leaving only versions 0.7.5-0.7.6  
> └─GlobalEnergyGIS [31bfc850] log:  
> ├─possible versions are: 0.1.0 or uninstalled  
> └─GlobalEnergyGIS [31bfc850] is fixed to version 0.1.0

---

<div class="post-metadata">

**Author:** ![moda](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@moda](https://discourse.julialang.org/u/moda)\
**Post date:** [June 26, 2022, 9:37pm UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/4 "2022-06-26T21:37:49Z")

</div>

The above problems were solved by creating a new environment

---

<div class="post-metadata">

**Author:** ![moda](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@moda](https://discourse.julialang.org/u/moda)\
**Post date:** [June 26, 2022, 9:43pm UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/5 "2022-06-26T21:43:13Z")

</div>

But still have the error：

> julia\> using GlobalEnergyGIS  
> [Info: Precompiling GlobalEnergyGIS [31bfc850-377e-11e9-327a-adf9289f3a6c]
> 
> Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x0 – CESS\_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x0 – at 0x0 –  
> Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception:  
> Please submit a bug repor at 0x0 – at 0x0 – it a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x0 – at 0x0 – CESS\_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x0 – at 0x0 – CESS\_VIOLATION with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.  
> Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x0 – unknown function (ip: 0000000000000000)  
> in expression starting at C:\Users\Administrator.julia\packages\IrrationalConstants\wgoLP\src\stats.jl:8  
> in expression starting at C:\Users\AdminERROR: LoadError: Failed to precompile IrrationalConstants [92d709cd-6900-40b7-9082-c6be49f344b6] to C:\Users\Administrator.julia\compiled\v1.6\IrrationalConstants\jl\_B01A.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923  
> [7] include  
> @ .\Base.jl:384 [inlined]  
> [8] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)  
> @ Base .\loading.jl:1235  
> [9] top-level scope  
> @ none:1  
> [10] eval  
> @ .\boot.jl:360 [inlined]  
> [11] eval(x::Expr)  
> @ Base.MainInclude .\client.jl:446  
> [12] top-level scope  
> @ none:1  
> in expression starting at C:\Users\Administrator.julia\packages\SpecialFunctions\oPGFg\src\SpecialFunctions.jl:1  
> ERROR: LoadError: Failed to precompile SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] to C:\Users\Administrator.julia\compiled\v1.6\SpecialFunctions\jl\_AEE2.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923  
> [7] include  
> @ .\Base.jl:384 [inlined]  
> [8] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)  
> @ Base .\loading.jl:1235  
> [9] top-level scope  
> @ none:1  
> [10] eval  
> @ .\boot.jl:360 [inlined]  
> [11] eval(x::Expr)  
> @ Base.MainInclude .\client.jl:446  
> [12] top-level scope  
> @ none:1  
> in expression starting at C:\Users\Administrator.julia\packages\ColorVectorSpace\bhkoO\src\ColorVectorSpace.jl:1  
> ERROR: LoadError: Failed to precompile ColorVectorSpace [c3611d14-8923-5661-9e6a-0046d554d3a4] to C:\Users\Administrator.julia\compiled\v1.6\ColorVectorSpace\jl\_AD3C.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923  
> [7] include  
> @ .\Base.jl:384 [inlined]  
> [8] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)  
> @ Base .\loading.jl:1235  
> [9] top-level scope  
> @ none:1  
> [10] eval  
> @ .\boot.jl:360 [inlined]  
> [11] eval(x::Expr)  
> @ Base.MainInclude .\client.jl:446  
> [12] top-level scope  
> @ none:1  
> in expression starting at C:\Users\Administrator.julia\packages\ImageCore\wTsMr\src\ImageCore.jl:1  
> ERROR: LoadError: Failed to precompile ImageCore [a09fc81d-aa75-5fe9-8630-4744c3626534] to C:\Users\Administrator.julia\compiled\v1.6\ImageCore\jl\_AB09.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923  
> [7] include  
> @ .\Base.jl:384 [inlined]  
> [8] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)  
> @ Base .\loading.jl:1235  
> [9] top-level scope  
> @ none:1  
> [10] eval  
> @ .\boot.jl:360 [inlined]  
> [11] eval(x::Expr)  
> @ Base.MainInclude .\client.jl:446  
> [12] top-level scope  
> @ none:1  
> in expression starting at C:\Users\Administrator.julia\packages\Images\BxFsu\src\Images.jl:1  
> ERROR: LoadError: Failed to precompile Images [916415d5-f1e6-5110-898d-aaa5f9f070e0] to C:\Users\Administrator.julia\compiled\v1.6\Images\jl\_A731.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923  
> [7] include  
> @ .\Base.jl:384 [inlined]  
> [8] include\_package\_for\_output(pkg::Base.PkgId, input::String, depot\_path::Vector{String}, dl\_load\_path::Vector{String}, load\_path::Vector{String}, concrete\_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)  
> @ Base .\loading.jl:1235  
> [9] top-level scope  
> @ none:1  
> [10] eval  
> @ .\boot.jl:360 [inlined]  
> [11] eval(x::Expr)  
> @ Base.MainInclude .\client.jl:446  
> [12] top-level scope  
> @ none:1  
> in expression starting at C:\Users\Administrator.julia\packages\GlobalEnergyGIS\rQD8B\src\GlobalEnergyGIS.jl:1  
> ERROR: Failed to precompile GlobalEnergyGIS [31bfc850-377e-11e9-327a-adf9289f3a6c] to C:\Users\Administrator.julia\compiled\v1.6\GlobalEnergyGIS\jl\_A29A.tmp.  
> Stacktrace:  
> [1] error(s::String)  
> @ Base .\error.jl:33  
> [2] compilecache(pkg::Base.PkgId, path::String, internal\_stderr::Base.TTY, internal\_stdout::Base.TTY, ignore\_loaded\_modules::Bool)  
> @ Base .\loading.jl:1385  
> [3] compilecache(pkg::Base.PkgId, path::String)  
> @ Base .\loading.jl:1329  
> [4] \_require(pkg::Base.PkgId)  
> @ Base .\loading.jl:1043  
> [5] require(uuidkey::Base.PkgId)  
> @ Base .\loading.jl:936  
> [6] require(into::Module, mod::Symbol)  
> @ Base .\loading.jl:923

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [June 28, 2022, 3:01am UTC](https://discourse.julialang.org/t/error-while-installing-and-using-globalenergygis-package-syntax-error/83349/6 "2022-06-28T03:01:40Z")

</div>

Works fine for me on Ubuntu Linux using Julia 1.7.3:

```bash
mkdir test
cd test
julia --project="."

```

```julia
using Pkg
pkg"add https://github.com/niclasmattsson/GlobalEnergyGIS"
using GlobalEnergyGIS

```
