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

KeyError:ea_daily_re when running landsat_prep_scene.py #82

Open
pixienat opened this issue Aug 29, 2022 · 4 comments
Open

KeyError:ea_daily_re when running landsat_prep_scene.py #82

pixienat opened this issue Aug 29, 2022 · 4 comments

Comments

@pixienat
Copy link

Hi. I am running this through conda and I have all the necessary packages install in order to run properly.

Here is my traceback upon running this line of code in my command line:
python C:\Users\NMarcom\pymetric\code\local\landsat_prep_scene.py -i C:\Users\NMarcom\pymetric\example\landsat_2015.ini

error traceback:

Run Time Stamp: 2022-08-29 12:05:31.663766 Current Directory: C:\Users\NMarcom\pymetric\example\2015\p043r030\LC08_L1TP_043030_20150415_20170227_01_T1 INI File: landsat_2015.ini Traceback (most recent call last): File "C:\Users\NMarcom\Anaconda3\envs\pymarkhi\lib\configparser.py", line 789, in get value = d[option] File "C:\Users\NMarcom\Anaconda3\envs\pymarkhi\lib\collections\__init__.py", line 883, in __getitem__ return self.__missing__(key) # support subclasses that define __missing__ File "C:\Users\NMarcom\Anaconda3\envs\pymarkhi\lib\collections\__init__.py", line 875, in __missing__ raise KeyError(key) KeyError: 'ea_daily_re'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\NMarcom\pymetric\code\prep_functions\landsat_prep_scene_func.py", line 1295, in <module> stats_flag=args.stats, overwrite_flag=args.overwrite) File "C:\Users\NMarcom\pymetric\code\prep_functions\landsat_prep_scene_func.py", line 338, in main ea_daily_re = re.compile(config.get('INPUTS', 'ea_daily_re')) File "C:\Users\NMarcom\Anaconda3\envs\pymarkhi\lib\configparser.py", line 792, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'ea_daily_re' in section: 'INPUTS'

#75 also indicated a key_error upon running this same script but was listed as resolved without comment. the key error is also different than the one I am receiving. I am wondering if there are other settings that need to be adjusted in the landsat_2015 settings file, other than described in the documentation?

Thanks.

@prevelle
Copy link
Collaborator

prevelle commented Sep 1, 2022

Hi @pixienat, the 'ea_daily_re' parameter is an input I added in that I believe is only used on the mountain_model branch. Am I correct that is the branch you are working with and trying to run?

It looks like I forgot to update the example project ini (landsat_2015) to include all the parameters I added that are needed in order to setup and run the example correctly. So that keyerror just indicates that the landsat_prep_scene_func.py script is looking for the value associated with the key of 'ea_daily_re' which it can't find because it is not in the INPUTS section of the landsat_2015.ini file.

I will work on updating the landsat_2015.ini file so it is set up properly and push a new commit in a few days hopefully when I have some time.

@pixienat
Copy link
Author

pixienat commented Sep 7, 2022

@prevelle
Sorry to bother, I was wondering if this has been fixed yet? If not, where in the settings file would I be able to add this?

@a1t1d1
Copy link

a1t1d1 commented Sep 7, 2022

@prevelle
I am having the same issue. What should be the value of ea_daily_re? Can I add it to the .ini file?

@prevelle
Copy link
Collaborator

prevelle commented Sep 7, 2022

@pixienat and @a1t1d1 I have pushed a commit with an updated landsat_2015.ini file to match the expected inputs for a project ini file for the branch, which should fix the issue but I haven't had time to test it.

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