samapriya / Planet-GEE-Pipeline-CLI

Planet and Google Earth Engine Pipeline Command Line Interface Tool
https://pypi.org/project/ppipe/
Apache License 2.0
42 stars 12 forks source link

unable to load imagecollection #11

Closed jimoreira closed 5 years ago

jimoreira commented 5 years ago

I' m trying to upload a folder with RAPIDEYE downloaded from planet. First, I can't produce the metadata.csv file yet. I don't understand if this work with previously downloaded images or just with the one i' m about to download. Second, atempting to upload the folder with images to an imagecollection,

C:\Users\javie>ppipe selupload --source C:\Users\javie\bichadero --dest users/javiermoreira/UBA/bichadero -u javiermoreira@gmail.com 2019-02-08 16:25:21,174 :: oauth2client.transport :: INFO :: Attempting refresh to obtain initial access_token 2019-02-08 16:25:21,183 :: oauth2client.client :: INFO :: Refreshing access_token Password:

it asks me to provide a Password, I' m not sure if it is a planet password, the planet KEY or the key provided when I run earthengine authenticate. BUT the main issue is it doesn't allow me to write, or paste anything. something similar happens to me when they ask me my mail and password.

any help? thanks!

jimoreira commented 5 years ago

Sorry, the error given when i try any of the options is the following, Traceback (most recent call last): File "C:\Python27\Scripts\ppipe-script.py", line 11, in <module> load_entry_point('ppipe==0.4.3', 'console_scripts', 'ppipe')() File "c:\python27\lib\site-packages\ppipe\ppipe.py", line 389, in main args.func(args) File "c:\python27\lib\site-packages\ppipe\ppipe.py", line 200, in selupload_from_parser manifest=args.manifest) File "c:\python27\lib\site-packages\ppipe\metadata_ingest.py", line 90, in selupload google_session = __get_google_auth_session(user, password) File "c:\python27\lib\site-packages\retrying.py", line 49, in wrapped_f return Retrying(*dargs, **dkw).call(f, *args, **kw) File "c:\python27\lib\site-packages\retrying.py", line 206, in call return attempt.get(self._wrap_exception) File "c:\python27\lib\site-packages\retrying.py", line 247, in get six.reraise(self.value[0], self.value[1], self.value[2]) File "c:\python27\lib\site-packages\retrying.py", line 200, in call attempt = Attempt(fn(*args, **kwargs), attempt_number, False) File "c:\python27\lib\site-packages\ppipe\metadata_ingest.py", line 278, in __get_google_auth_session driver = Firefox(executable_path=os.path.join(lp,"geckodriver.exe"),firefox_options=options) File "c:\python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__ keep_alive=True) File "c:\python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "c:\python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "c:\python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "c:\python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

samapriya commented 5 years ago

Couple of things to keep in mind

  1. You cannot push images directly from Planet, and you cannot use this tool without a screen on a server. Selenium requires a display. Am not sure your setup is correct. Before running selupload you have to do ppipe update to make sure selenium driver is downloaded.

  2. You have to first download the images to your computer, including the tiff file and the xml metadata files. Then use the pipe metadata tool to create metadata.csv file.

  3. You cannot use selupload without a manifest file

    
    usage: ppipe selupload [-h] --source SOURCE --dest DEST [-m METADATA]
                       [-mf MANIFEST] [--nodata NODATA] [-u USER] [-b BUCKET]

optional arguments: -h, --help show this help message and exit

Required named arguments.: --source SOURCE Path to the directory with images for upload. --dest DEST Destination. Full path for upload to Google Earth Engine, e.g. users/pinkiepie/myponycollection -m METADATA, --metadata METADATA Path to CSV with metadata. -mf MANIFEST, --manifest MANIFEST Manifest type to be used,Choose PS OrthoTile(PSO)|PS OrthoTile DN(PSO_DN)|PS OrthoTile Visual(PSO_V)|PS4Band Analytic(PS4B)|PS4Band DN(PS4B_DN)|PS4Band SR(PS4B_SR)|PS3Band Analytic(PS3B)|PS3Band DN(PS3B_DN)|PS3Band Visual(PS3B_V)|RE OrthoTile (REO)|RE OrthoTile Visual(REO_V) -u USER, --user USER Google account name (gmail address).

Optional named arguments: --nodata NODATA The value to burn into the raster as NoData (missing data) -b BUCKET, --bucket BUCKET Google Cloud Storage bucket name.



Since I cannot recreate this issue, I am closing this for now.
jimoreira commented 5 years ago

ok, understood. I have tried again with the manifest, and nothing (the same error message: selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities). Could you expand on the selenium part?. When I run ppipe update the following appears Downloading from: https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-win64.zip [*] 4.5 MB / 4.5 MB @ 1.4 MB/s [##################] [100%, 0s left] [Errno 13] Permission denied: 'c:\\python27\\lib\\site-packages\\ppipe\\geckodriver.exe' Updated selenium driver for Windows64 is that ok? should something else happen?

jimoreira commented 5 years ago

ok, I have solved the problem. the geckodriver.exe refers to Firefox as a web browser. I didn't have it installed. I do, and everything works. It seems to me that this should be noted in the requirements.

samapriya commented 5 years ago

Hi @jimoreira It is mentioned in the readme file. Am glad everything works okay now