```--reverse-column-indices``` triggers an erro
Closed this issue · 7 comments
Thank you for the enhancement! It exactly fits what I need to do. Sadly I'm not being able to make it work: below the command and the result. (I'm using python 2.7.1 on macOSX 10.7.5)
emanuele$ python pareto.py -o 0-1 -e 5.0 5000.0 --output HB_200K.reference --comment "#" --contribution --line-number --reverse-column-indices ANN* RBF*
Traceback (most recent call last):
File "pareto.py", line 485, in <module>
cli(get_args(sys.argv))
File "pareto.py", line 112, in get_args
args.maximize = [-1 -ob for ob in args.maximize]
TypeError: 'NoneType' object is not iterable
even if I specify just one column, it says
emanuele$ python pareto.py -o 0 -e 5.0 5000.0 --output HB_200K.reference --comment "#" --contribution --line-number --reverse-column-indices ANN* RBF*
Traceback (most recent call last):
File "pareto.py", line 485, in <module>
cli(get_args(sys.argv))
File "pareto.py", line 112, in get_args
args.maximize = [-1 -ob for ob in args.maximize]
TypeError: 'NoneType' object is not iterable
I'm glad to give you any help I can
I'm guessing this just needs a:
if args.maximize is not None:
in front of it.
Try it now. Sorry about that.
Oops! Should have tested that without a maximization objective! Thanks for the fix Jon, that's exactly the problem.
Cool. I also put in the check for objectives, because if I remember right objectives aren't a required argument ... the default behavior is to sort all columns, right?
Yes, that's quite right, and a good catch as well. I just made an issue for better testing --- this is a corner case we easily could have let slip.
Emanuele, let us know if you have any more trouble. Thanks!
Now it works like perfectly on my case study, thank you!
Thanks for the feedback, and for helping to make pareto.py
better!