Opened 2 years ago

Last modified 2 years ago

#1952 new defect

simfactory --substitute trys to modify a tuple

Reported by: Roland Haas Owned by:
Priority: major Milestone:
Component: SimFactory Version: development version
Keywords: Cc:


Trying to use the --substitute option to simfactory I get:

+ simfactory/bin/sim submit --machine bluewaters --testsuite --walltime 4:0:0 --procs 8 --num-threads 4
--substitute SW_BLDDIR EinsteinToolkit/2016_05/cle5.2_gnu5.1.0/ET_2016_05 2016_05-swretest-16622-1471972677
Warning: Current Working directory does not match Cactus sourcetree, changing to /u/staff/rhaas/software
Traceback (most recent call last):
  File "simfactory/bin/../lib/", line 148, in <module>
  File "simfactory/bin/../lib/", line 144, in main
  File "simfactory/bin/../lib/", line 106, in CommandDispatch
  File "ET_2016_05/repos/simfactory2/lib/", line 397, in main
  File "ET_2016_05/repos/simfactory2/lib/", line 376, in CommandDispatch
    exec("command_%s()" % command)
  File "<string>", line 1, in <module>
  File "ET_2016_05/repos/simfactory2/lib/", line 267, in command_submit
  File "ET_2016_05/repos/simfactory2/lib/", line 319, in userSubmit
  File "ET_2016_05/repos/simfactory2/lib/", line 255, in initRestart
    ret = self.load(simulationName)
  File "ET_2016_05/repos/simfactory2/lib/", line 88, in load
    self.BaseDir = simlib.GetBaseDir(machineEntry)
  File "ET_2016_05/repos/simfactory2/lib/", line 250, in GetBaseDir
    basedir = DefineDatabase.SubAll(machineEntry.basedir)
  File "ET_2016_05/repos/simfactory2/lib/", line 230, in SubAll
    ss = self.PerformRegexSubstitutions(ss)
  File "ET_2016_05/repos/simfactory2/lib/", line 102, in PerformRegexSubstitutions
    rx_pair[1] = rx_pair[1].replace("@1@", r"\1")
TypeError: 'tuple' object does not support item assignment

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by Erik Schnetter

Does it work if you use replace instead of substitute?

comment:2 Changed 2 years ago by Roland Haas

--replace does not fail, I am not sure if it does the right thing yet.

comment:3 Changed 2 years ago by Erik Schnetter

replace is for direct string substitution, substitute uses regular expressions.

comment:4 Changed 2 years ago by Roland Haas

I agree, --subsitute seems to still be broken though.

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.