samapriya/geeup

Disconnect with GDAL

CGaffey opened this issue · 9 comments

Hi, can you help me pinpoint what is going on here? I started with "geeup init" prior to trying to run the getmeta tool but I am running into problems with GDAL, which I do have (see the last command). Any help is appreciated!

(ee) (venv) Clares-MacBook-Pro:geeup claregaffey$ geeup getmeta --input /Users/claregaffey/Documents/Data/Pre2018clip --metadata /Users/claregaffey/Documents/SI_Metadata.csv
Traceback (most recent call last):
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 657, in _load_unlocked
File "", line 556, in module_from_spec
File "", line 1101, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: dlopen(/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so, 2): Symbol not found: _GDALAttributeFreeRawResult
Referenced from: /Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so
Expected in: flat namespace
in /Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg/geeup/getmeta.py", line 9, in getmeta
from osgeo import gdal
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 32, in
_gdal = swig_import_helper()
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 31, in swig_import_helper
return importlib.import_module('_gdal')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_gdal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 657, in _load_unlocked
File "", line 556, in module_from_spec
File "", line 1101, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: dlopen(/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so, 2): Symbol not found: _GDALAttributeFreeRawResult
Referenced from: /Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so
Expected in: flat namespace
in /Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/_gdal.cpython-38-darwin.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/claregaffey/PycharmProjects/GEE/venv/bin/geeup", line 33, in
sys.exit(load_entry_point('geeup==0.4.3', 'console_scripts', 'geeup')())
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg/geeup/geeup.py", line 311, in main
func(args)
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg/geeup/geeup.py", line 197, in getmeta_from_parser
getmeta(indir=args.input,mfile=args.metadata)
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg/geeup/getmeta.py", line 11, in getmeta
import gdal
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/gdal.py", line 2, in
from osgeo.gdal import deprecation_warn
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 32, in
_gdal = swig_import_helper()
File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/osgeo/init.py", line 31, in swig_import_helper
return importlib.import_module('_gdal')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_gdal'
(ee) (venv) Clares-MacBook-Pro:geeup claregaffey$ gdalinfo --version
GDAL 3.1.2, released 2020/07/07

Hi @CGaffey
Can you import gdal in python setup, simply

import gdal

or

from osgeo import gdal

Hi @samapriya,

Thanks...I've finally managed to get gdal python binaries stabilized.

Now on the uploader I'm getting the following error. I have downloaded firefox. Any suggestions on how I can resolve?

File "/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg/geeup/batch_uploader.py", line 313, in __get_google_auth_session
driver = Firefox(
TypeError: init() got an unexpected keyword argument 'firefox_options'

Hi @CGaffey
Made some changes, try with version 0.4.4. Removed use of deprecated firefox_options to options. Hopefully, that should help

Thanks @samapriya

I'm getting the error below. I also restarted my env and recloned the git. What should I try?

(ee) (venv) Clares-MacBook-Pro:geeup claregaffey$ geeup init

=========================================================================
Current version of geeup is 0.4.3 upgrade to lastest version: 0.4.4

Downloading from: https://github.com//mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-macos.tar.gz [*] 1.8 MB / 1.8 MB @ 581 kB/s [##################] [100%, 0s left]
Issues updating with error File is not a zip file

Try

pip install geeup --upgrade

This should upgrade you to v0.4.4

Thanks for your help @samapriya, I'm really looking forward to getting this working.
I know this is a pip problem, but I'm having trouble upgrading with it. With just the recommended command I get:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/retrying-1.2.3-py3.8.egg-info/PKG-INFO'
Consider using the --user option or check the permissions.

With the --user option I get the below error. I tried the --force command but still get that. Is there a way around upgrading to the new version?

Will not install to the user site because it will lack sys.path precedence to geeup in /Users/claregaffey/PycharmProjects/GEE/venv/lib/python3.8/site-packages/geeup-0.4.3-py3.8.egg

Hi @CGaffey
Can you email me so we can touch base and discuss this, I have not seen this error and the Continuous Integration feature checks that it runs on all operating systems and for all python versions.

You can also try these two things

First create a new python3 virtual env again you can do a

then try a simple
pip install geeup --user

if that doesn't work try

pip install geeup --upgrade --user --no-deps

or build from scratch

git clone https://github.com/samapriya/geeup.git
cd geeup
python setup.py install

That's great @CGaffey