Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of metadata file #26

Closed
bennyistanto opened this issue Sep 8, 2020 · 9 comments
Closed

Example of metadata file #26

bennyistanto opened this issue Sep 8, 2020 · 9 comments

Comments

@bennyistanto
Copy link

bennyistanto commented Sep 8, 2020

Do you have any example file of simple metadata?

I tried to create simple metadata.csv as written in other closed issue in here:
id_no time_start xsize ysize pixel_resolution num_bands
sstanom_0 1981-01-01 2395 1468 0.05 1
...

Unfortunately still failed, here's the error messages:

bennyistanto@WFPIDJKTM149915 GeeUp % geeup upload --source /Users/bennyistanto/GeeUp --dest users/bennyistanto/datasets/raster/sst/nino34/lag0 --metadata /Users/bennyistanto/GeeUp/sst_metadata.csv --nodata -9999 -u bennyistanto@gmail.com
WARNING:root:Property name %s is invalid. Special properties [system:description, system:provider_url, system:tags, system:time_end, system:time_start, system:title] are allowed; other property keys must contain only letters, digits and underscores.
Traceback (most recent call last):
  File "/Users/bennyistanto/opt/anaconda3/bin/geeup", line 8, in <module>
    sys.exit(main())
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/geeup.py", line 311, in main
    func(args)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/geeup.py", line 216, in upload_from_parser
    nodata_value=args.nodata)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/batch_uploader.py", line 96, in upload
    metadata = load_metadata_from_csv(metadata_path) if metadata_path else None
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/metadata_loader.py", line 67, in load_metadata_from_csv
    raise IllegalPropertyName()
geeup.metadata_loader.IllegalPropertyName
bennyistanto@WFPIDJKTM149915 GeeUp % 

I am using macOS 10.15.6 with python 3.7.8 installed through anaconda, earthengine-api-0.1.233, and geeup-0.4.4

@samapriya
Copy link
Owner

Hi @bennyistanto
You have to pass system:time_start in milliseconds instead of a time_start in your metadata file

You can use a website like https://www.epochconverter.com/ to convert your time to a usable format or write a script to do that

Then your column headers would be

id_no system:time_start xsize ysize pixel_resolution num_bands
sstanom_0 347164303000 2395 1468 0.05 1

Let me know if that works

@bennyistanto
Copy link
Author

I tried to convert it in Excel using formula: =(B2-DATE(1970;1;1))*86400 where B is the date. Here's the file: https://share.getcloudapp.com/jkuZBZv0

Unfortunately still experiencing the same error as above. Any advise?

@samapriya
Copy link
Owner

Hi @bennyistanto
Your columns were not separated it was a single column with a semicolon, try unzipping and using this one
sst_metadata.zip

@bennyistanto
Copy link
Author

Thanks, I have download it and still experience an error, but different message.

bennyistanto@WFPIDJKTM149915 GeeUp % geeup init
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 @ 649 kB/s [##################] [100%, 0s left]     
Use selenium driver path as /Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup
bennyistanto@WFPIDJKTM149915 GeeUp % geeup upload --source /Users/bennyistanto/GeeUp --dest users/bennyistanto/datasets/raster/sst/nino34/lag0 --metadata /Users/bennyistanto/GeeUp/sst_metadata.csv --nodata -9999 -u bennyistanto@gmail.com
Password: 
Traceback (most recent call last):
  File "/Users/bennyistanto/opt/anaconda3/bin/geeup", line 8, in <module>
    sys.exit(main())
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/geeup.py", line 311, in main
    func(args)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/geeup.py", line 216, in upload_from_parser
    nodata_value=args.nodata)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/batch_uploader.py", line 100, in upload
    google_session = __get_google_auth_session(user, password)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/geeup/batch_uploader.py", line 316, in __get_google_auth_session
    executable_path=os.path.join(lp, "geckodriver"), options=options
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    keep_alive=True)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/Users/bennyistanto/opt/anaconda3/lib/python3.7/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

bennyistanto@WFPIDJKTM149915 GeeUp % 

@samapriya
Copy link
Owner

Do you have firefox installed on your system if not could you install firefox and try geeup init again

@bennyistanto
Copy link
Author

I just installed firefox 81.0b9 and restarted my Mac, but unfortunately the error remain same.

Screen Shot 2020-09-14 at 10 38 30 AM

@samapriya
Copy link
Owner

Closing this since I could not reproduce this issue to bugfix

@ricds
Copy link

ricds commented May 17, 2022

@samapriya i was having the same error message with system:start_date and the problem was when i saved in excel it changed the file encoding to "UTF-8 BOM", then I changed it to "UTF-8" using Notepad++ and the code recognized the column correctly.

@samapriya
Copy link
Owner

Hi @ricds
Thanks for the input I hope this insight helps others too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants