Import: command not found - Shebang missing?

82 views
Skip to first unread message

Sven Borgstrom

unread,
Sep 22, 2022, 5:13:08 PM9/22/22
to MintPy
Hi Yunjun,
sorry for disturbing you again.

I had some problems today with Mintpy so I decided to remove and reinstall it.

Just to check the version, I gave the "smallbaselineApp.py -v" command, but I got the error messages as indicated in the subject (see also the attached file).

Correct me if I'm wrong, but is this related to a missing shebang at the top of the script? Also the other scripts have no shebang at the top.

Cheers,
Sven.
Import_command_not_found.png

Zhang Yunjun

unread,
Sep 22, 2022, 10:30:51 PM9/22/22
to MintPy
Hi Sven,

You are very up-to-date with the latest changes, and that's great! And you are right, that specific error is due to the missing shebang statement. 

This is due to the changes we committed yesterday (https://github.com/insarlab/MintPy/pull/828). Thanks to Antonio Valentino from ESA, we now have a new sub-module in mintpy (mintpy.cli) specifically handling the command line interface (CLI). The benefit is that CLI is much much faster, which I think you will like a lot. 

But your mintpy code, after updating to the latest version, needs to be re-installed, either via pip install -e ./MintPy, or via path setup using export PATH=${PATH}:${MINTPY_HOME}/mintpy/cli instead of export PATH=${PATH}:${MINTPY_HOME}/mintpy. The installation guideline (https://github.com/insarlab/MintPy/blob/main/docs/installation.md) has been updated for this.
 
Let me know if you have any issues.
Cheers,
Yunjun

Sven Borgstrom

unread,
Sep 23, 2022, 5:37:13 PM9/23/22
to MintPy
Hi Yunjun,
after path setup I used again Mintpy, but I had another issue (see the attached file), related to an "UnboundLocalError" at the atmospheric correction step.
I tried more than once but still the same error message.
Cheers,
Sven.
UnboundLocalError.png

Zhang Yunjun

unread,
Sep 24, 2022, 2:10:22 AM9/24/22
to MintPy
Hi Sven,
Thank you for the issue reporting. This error is now fixed in (https://github.com/insarlab/MintPy/pull/854). 
Cheers,
Yunjun
Reply all
Reply to author
Forward
0 new messages