Bug #4319

Extra spaces in command line are added to parameter name

Added by Knödlseder Jürgen over 1 year ago. Updated over 1 year ago.

Status:RejectedStart date:06/07/2023
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

0%

Category:-
Target version:-
Duration:

Description

It seems that extra spaces on the command line are added to the parameter names, as illustrated below. I’m surprised that I never encountered this problem before.

$ cslightcrv inobs=gc_events_30m.fits inmodel=gc_model_simpl.xml  srcname="Galactic Centre"  tbinalg=LIN tmin=0 tmax=1800 tbins=10  emin=0.1 emax=100 enumbins=0 outfile=gc_lc.fits chatter=4  irf=South_z20_0.5h  caldb=prod3b-v2  method=3D logfile=cslightcrv_30m_jk.log nthreads=1
Traceback (most recent call last):
  File "/Users/jurgen/anaconda3/envs/ctools-2.0.0/bin/cslightcrv", line 791, in <module>
    app = cslightcrv(sys.argv)
  File "/Users/jurgen/anaconda3/envs/ctools-2.0.0/bin/cslightcrv", line 74, in __init__
    self._init_csobservation(self.__class__.__name__, ctools.__version__, argv)
  File "/Users/jurgen/anaconda3/envs/ctools-2.0.0/lib/python3.9/site-packages/ctools/tools.py", line 1538, in _init_csobservation
    csobservation.__init__(self, name, version, *argv)
  File "/Users/jurgen/anaconda3/envs/ctools-2.0.0/lib/python3.9/site-packages/ctools/tools.py", line 1497, in __init__
    this = _tools.new_csobservation(*args)
ValueError: *** ERROR in GApplicationPars::load(GFilename&, std::vector<std::string>&): Invalid argument. No parameter with name " srcname" found. Please specify an existing command line parameter.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 1 year ago

  • Status changed from New to Rejected

It is actually not true that extra spaces added added to the parameter name, apparently what I was taking for spaces were some hidden characters.

Also available in: Atom PDF