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
Catch and report PyAPS Copernicus Climate Store credential error #226
Comments
Hi @andretheronsa, I agree that better handling of the error message is desired. I implemented it to not raise Error message in order to support the time-series with the latest acquisition, whose ERA5 data is not available yet. The current way is ignoring it and continue, maybe raising a warning will support both scenarios. I will put it in the to-do list and try it laterward in 2 months. Feel free to try it if you want to. A workaround solution is to run the test notebook from pyaps3: |
Hello @yunjunz I share the MintPy workflow sometimes and I also encounter this problem because they forget to set the pyaps config. I do this to check for pyaps credentials. Maybe MintPy can implement something similar? import os
import pyaps3
from configparser import ConfigParser
cfg_path = os.path.join(os.path.dirname(pyaps3.__file__), 'model.cfg')
cfg = ConfigParser()
cfg.read(cfg_path)
key = cfg.get('CDS', 'key')
if not key:
raise ValueError('pyaps3 credentials are empty!') |
We could add this in tropo_pyaps3.py#L544. It should at least address one of the two FAQs. Could you issue a PR for it @pbrotoisworo? |
I am new to InSAR processing, and ran across this issue as well. With some guidance from the very kind folks at ASF, they directed me to this issue. After some additional digging as to why my MintPy
Once that was done, the processing I needed worked. |
Not sure if it is bug report or feature request.
ERA5 PYAPS Tropospheric delay correction currently fails with a hard to diagnose ZeroDivisionError in the progress bar class when the user's login credentials for https://cds.climate.copernicus.eu/ is not correct (or if the user has not accepted the T&Cs). This makes a simple problem (user registration) very hard to figure out.
Going through the code and error stack below reveals that the division error is a result of the date_list2grib_file function not returning a list of data since it does not have access to the service. The progress bar then uses the length of this empty list to set the endpoint of the progress bar resulting in the error.
I think one solution would be to catch the specific error in the try clause (line 398) of the dload_grib_files function in tropo_pyaps3.py.
The text was updated successfully, but these errors were encountered: