Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Error when running scripts_regression_tests.py

xcj

xcj
New Member
I am running scripts_regression_tests.py according to: 6. Porting and validating CIME on a new platform — CIME master documentation, however am encountering the following error:

Any way to resolve this?

"Traceback (most recent call last):
File "./scripts_regression_tests.py", line 2894, in <module>
_main_func(__doc__)
File "./scripts_regression_tests.py", line 2834, in _main_func
MACHINE = Machines()
File "/home/itan/my_cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 53, in __init__
machine = self.probe_machine_name()
File "/home/itan/my_cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 112, in probe_machine_name
machine = self._probe_machine_name_one_guess(nametomatch)
File "/home/itan/my_cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 147, in _probe_machine_name_one_guess
regex = re.compile(regex_str)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/re.py", line 234, in compile
return _compile(pattern, flags)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/3.7.4/lib/python3.7/sre_parse.py", line 651, in _parse
source.tell() - here + len(this))
re.error: nothing to repeat at position 0"
 

emmanueln

Emmanuel
New Member
Hi, I'm having the same issue, were you able to solve the problem?
I tried running the script with python 3.7 and 3.6.

Python 3.7 returns:
python3.7 ./scripts_regression_tests.py
Traceback (most recent call last):
File "./scripts_regression_tests.py", line 3628, in <module>
_main_func(__doc__)
File "./scripts_regression_tests.py", line 3571, in _main_func
MACHINE = Machines()
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 69, in __init__
machine = self.probe_machine_name()
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 136, in probe_machine_name
machine = self._probe_machine_name_one_guess(nametomatch)
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 171, in _probe_machine_name_one_guess
regex = re.compile(regex_str)
File "/usr/lib64/python3.7/re.py", line 234, in compile
return _compile(pattern, flags)
File "/usr/lib64/python3.7/re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib64/python3.7/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib64/python3.7/sre_parse.py", line 924, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib64/python3.7/sre_parse.py", line 420, in _parse_sub
not nested and not items))
File "/usr/lib64/python3.7/sre_parse.py", line 645, in _parse
source.tell() - here + len(this))
re.error: nothing to repeat at position 0


Python 3.6:
python3.6 ./scripts_regression_tests.py
Traceback (most recent call last):
File "./scripts_regression_tests.py", line 3628, in <module>
_main_func(__doc__)
File "./scripts_regression_tests.py", line 3571, in _main_func
MACHINE = Machines()
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 69, in __init__
machine = self.probe_machine_name()
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 136, in probe_machine_name
machine = self._probe_machine_name_one_guess(nametomatch)
File "$HOME/cesm2/cesm_sandbox/cime/scripts/tests/../lib/CIME/XML/machines.py", line 171, in _probe_machine_name_one_guess
regex = re.compile(regex_str)
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "$HOME/.pyenv/versions/3.6.10/lib/python3.6/sre_parse.py", line 616, in _parse
source.tell() - here + len(this))
sre_constants.error: nothing to repeat at position 0


Thanks, best regards.
 
Top