KMarkert / EarthEngine.jl

Google Earth Engine in Julia
https://kmarkert.github.io/EarthEngine.jl/dev/
MIT License
49 stars 2 forks source link

Landsat 8 cloud masking example not working #5

Open tpoisot opened 1 year ago

tpoisot commented 1 year ago

The last part is failing, specifically:

getThumbURL(composite, Dict(
    :bands => "B7,B5,B3",
    :min => 0.05,
    :max => 0.55,
    :gamma => 1.5,
    :region => region,
    :dimensions => 1024
))

The error is:

WARNING: both EarthEngine and Base export "Dict"; uses of it in module Main must be qualified
ERROR: UndefVarError: `Dict` not defined
Stacktrace:
 [1] top-level scope
   @ ~/DataSci/LandsatComposites/composite.jl:55

Using the following:

getThumbURL(composite, EarthEngine.Dict(
    :bands => "B7,B5,B3",
    :min => 0.05,
    :max => 0.55,
    :gamma => 1.5,
    :region => region,
    :dimensions => 1024
))

gives the following python error:

ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/tpoisot/.julia/packages/PyCall/ilqDX/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'TypeError'>
TypeError('Type Dict cannot be instantiated; use dict() instead')
  File "/home/tpoisot/.julia/conda/3/x86_64/lib/python3.10/typing.py", line 955, in __call__
    raise TypeError(f"Type {self._name} cannot be instantiated; "

Output of versioninfo():

julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 6 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 6

Output of ]st:

(LandsatComposites) pkg> st
Status `~/DataSci/LandsatComposites/Project.toml`
  [8f4d0f93] Conda v1.9.1
  [e0774970] EarthEngine v0.3.2
  [438e738f] PyCall v1.96.1