-
Notifications
You must be signed in to change notification settings - Fork 5
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
arg less main() for pip install -e
#5
Comments
@yunjunz this issues is caused by trying to convert >>> set(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not iterable You'll likewise have problems trying to >>> ' '.join(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only join an iterable In the old install, you set So if you wanted to have the old behavior, you could do the same with a: if iargs is None:
iargs = sys.argv[1:] This will have issues, however, where if iargs is None:
iargs = [] which will look like the old case where the script was invoked without any arguments. In general, I'd caution against doing operations against |
Thank you @jhkennedy for the diagnose. The following modification seems to work in all three scenarios for versions installed via pip or path setup. I have issued a PR for it. # save argv (to check the manually specified arguments)
# use iargs for python call
# use sys.argv[1:] for command line call
inps.argv = iargs if iargs else sys.argv[1:] |
It seems when installing mintpy using
pip install -e MintPy
, the command-line options are not working:The solution could be using the
sys.argv
all the time as suggested in insarlab#652.view.py
has the most complicated usage ofiargs
. If the following 3 scenarios works, then it should be safe to translate the rest of mintpy to arg less main() style:The text was updated successfully, but these errors were encountered: