.cdsapirc File Not Found Error

42 views
Skip to first unread message

Sven Borgstrom

unread,
Jun 7, 2025, 3:51:26 AMJun 7
to MintPy
Hi Yunjun,
sorry for disturbing you.
I'm processing a stack of S1 data over my AOI.

While downloading the *.grb files, I feced the problem reported in the subject and in the attached file.
I processed the same stack just some days ago with less data and processing finished regularly, with *.grb files downloaded.

Mi .cdsapirc file is regularly set in my $HOME (/Users/sven/ as I'm on Mac OS XV) and in my working conda env I have "cdsapi" 0.7.5 from conda-forge.
MintPy is at its last release (1.6.1.post35, 2025-06-05).

B.t.w. I saw there was recently also an uprgade of the "tropo_pyaps3.py" script: could be my problem related to this?

Best,
Sven.

cdsapirc File Not Found.png

Yuan-Kai Liu

unread,
Jun 7, 2025, 10:13:23 AMJun 7
to MintPy
mine script does not look like yours (tropo_pyaps3.py).

Try to a git pull?

Yuan-Kai Liu

unread,
Jun 7, 2025, 10:30:12 AMJun 7
to MintPy
In your tropo_pyaps3.py, line 424. It tries to find the file from ''.cdsapirc" from the current dir?
I thought it should be under "~/.cdsapirc".

I think there is a version issue for your MintPy...
You said you are using the latest 1.6.1 release but that code is still doing the hardcoded 
np.load_txt('.cdsapirc', dtype=str)

but if you see the 1.6.1 on github, it is doing something more detailed and advanced:
cfg_file = os.path.join(os.path.dirname(pa.__file__), 'model.cfg')
rc_file = os.path.expanduser('~/.cdsapirc')

Sven Borgstrom

unread,
Jun 7, 2025, 11:05:35 AMJun 7
to MintPy
Ok,
I got the "tropo_pyaps3.py" script from the last git pull.
Now I set line 424 as you said (originally it was .cdsapirc and not ~/.cdsapirc) b.t.w. I get always the same error.
Sven.

Yuan-Kai Liu

unread,
Jun 7, 2025, 11:49:27 AMJun 7
to MintPy
Is it still trying to find the file from the current dir? Or now it says  ~/.cdsapir not found?
But you said you have that file under your home dir.

Sven Borgstrom

unread,
Jun 7, 2025, 12:04:41 PMJun 7
to MintPy
At the end I fixed the issue.
You were right, there was no point in correcting line 424 so I put the "tropo_pyaps3.py" script you pointed out from 1.6.1 from github into MintPy/src/mintpy/ and I downloaded the missing *.grb files, up to the end of processing.
My .cdsapirc file is in the $HOME.
Thanks,
Sven.

Yuan-Kai Liu

unread,
Jun 7, 2025, 12:27:58 PMJun 7
to MintPy
Great!. But I think there could still be some version issue there.
You can check your current mintpy dir and diff with the upstream/main, there could be more differences from other scripts.

First make sure you have committed some of your edits. 
Then check the remote. (mine is called upstream, linking to g...@github.com:insarlab/MintPy.git)
$ git remote -vv
origin g...@github.com:yuankailiu/MintPy.git (fetch)
origin g...@github.com:yuankailiu/MintPy.git (push)
upstream g...@github.com:insarlab/MintPy.git (fetch)
upstream g...@github.com:insarlab/MintPy.git (push)
yunjunz g...@github.com:yunjunz/MintPy.git (fetch)
yunjunz g...@github.com:yunjunz/MintPy.git (push)

Here I will do these to update
$ git fetch upstream main
$ git pull upstream/main

Zhang Yunjun

unread,
Jun 10, 2025, 10:54:54 AMJun 10
to MintPy
Hi Sven and Kai,

This is a bug I introduced in a recent PR. Sorry about that. It's fixed now by https://github.com/insarlab/MintPy/pull/1373.

Regards,
Yunjun
Reply all
Reply to author
Forward
0 new messages