#4770 Cannot run tox tests: tox.exception.ConfigError: ConfigError: substitution key '1' not found
Closed: Won't Fix 2 years ago by wombelix. Opened 4 years ago by churchyard.

$ rpm -q python3-tox
python3-tox-3.14.3-1.fc32.noarch

$ tox
Traceback (most recent call last):
  File "/usr/bin/tox", line 11, in <module>
    load_entry_point('tox==3.14.3', 'console_scripts', 'tox')()
  File "/usr/lib/python3.8/site-packages/tox/session/__init__.py", line 44, in cmdline
    main(args)
  File "/usr/lib/python3.8/site-packages/tox/session/__init__.py", line 64, in main
    config = load_config(args)
  File "/usr/lib/python3.8/site-packages/tox/session/__init__.py", line 80, in load_config
    config = parseconfig(args)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 266, in parseconfig
    ParseIni(config, config_file, content)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1121, in __init__
    raise tox.exception.ConfigError(
tox.exception.ConfigError: ConfigError: py27-flask01{1} failed with ConfigError: substitution key '1' not found at Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1097, in run
    results[name] = cur_self.make_envconfig(name, section, subs, config)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1236, in make_envconfig
    res = meth(env_attr.name, env_attr.default, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1418, in getpath
    path = self.getstring(name, defaultpath, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1497, in getstring
    x = self._replace_if_needed(x, name, replace, crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1502, in _replace_if_needed
    x = self._replace(x, name=name, crossonly=crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1528, in _replace
    replaced = Replacer(self, crossonly=crossonly).do_replace(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1568, in do_replace
    expanded = substitute_once(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1562, in substitute_once
    return self.RE_ITEM_REF.sub(self._replace_match, x)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1609, in _replace_match
    return self._replace_substitution(match)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1644, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1638, in _substitute_from_other_section
    raise tox.exception.ConfigError("substitution key {!r} not found".format(key))
tox.exception.ConfigError: ConfigError: substitution key '1' not found

py35-flask01{1} failed with ConfigError: substitution key '1' not found at Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1097, in run
    results[name] = cur_self.make_envconfig(name, section, subs, config)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1236, in make_envconfig
    res = meth(env_attr.name, env_attr.default, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1418, in getpath
    path = self.getstring(name, defaultpath, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1497, in getstring
    x = self._replace_if_needed(x, name, replace, crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1502, in _replace_if_needed
    x = self._replace(x, name=name, crossonly=crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1528, in _replace
    replaced = Replacer(self, crossonly=crossonly).do_replace(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1568, in do_replace
    expanded = substitute_once(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1562, in substitute_once
    return self.RE_ITEM_REF.sub(self._replace_match, x)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1609, in _replace_match
    return self._replace_substitution(match)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1644, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1638, in _substitute_from_other_section
    raise tox.exception.ConfigError("substitution key {!r} not found".format(key))
tox.exception.ConfigError: ConfigError: substitution key '1' not found

py36-flask01{1} failed with ConfigError: substitution key '1' not found at Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1097, in run
    results[name] = cur_self.make_envconfig(name, section, subs, config)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1236, in make_envconfig
    res = meth(env_attr.name, env_attr.default, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1418, in getpath
    path = self.getstring(name, defaultpath, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1497, in getstring
    x = self._replace_if_needed(x, name, replace, crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1502, in _replace_if_needed
    x = self._replace(x, name=name, crossonly=crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1528, in _replace
    replaced = Replacer(self, crossonly=crossonly).do_replace(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1568, in do_replace
    expanded = substitute_once(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1562, in substitute_once
    return self.RE_ITEM_REF.sub(self._replace_match, x)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1609, in _replace_match
    return self._replace_substitution(match)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1644, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1638, in _substitute_from_other_section
    raise tox.exception.ConfigError("substitution key {!r} not found".format(key))
tox.exception.ConfigError: ConfigError: substitution key '1' not found

py37-flask01{1} failed with ConfigError: substitution key '1' not found at Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1097, in run
    results[name] = cur_self.make_envconfig(name, section, subs, config)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1236, in make_envconfig
    res = meth(env_attr.name, env_attr.default, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1418, in getpath
    path = self.getstring(name, defaultpath, replace=replace)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1497, in getstring
    x = self._replace_if_needed(x, name, replace, crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1502, in _replace_if_needed
    x = self._replace(x, name=name, crossonly=crossonly)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1528, in _replace
    replaced = Replacer(self, crossonly=crossonly).do_replace(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1568, in do_replace
    expanded = substitute_once(value)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1562, in substitute_once
    return self.RE_ITEM_REF.sub(self._replace_match, x)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1609, in _replace_match
    return self._replace_substitution(match)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1644, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/usr/lib/python3.8/site-packages/tox/config/__init__.py", line 1638, in _substitute_from_other_section
    raise tox.exception.ConfigError("substitution key {!r} not found".format(key))
tox.exception.ConfigError: ConfigError: substitution key '1' not found

This makes the problem go away:

diff --git a/tox.ini b/tox.ini
index 4b0c8067..1df12c24 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py{27,35,36,37}-flask{100,01{1,2}}
+envlist = py{27,35,36,37}-flask{100,011,012}
 skipsdist = True

Metadata Update from @pingou:
- Issue tagged with: bug, easyfix

4 years ago

Metadata Update from @wombelix:
- Issue assigned to wombelix

2 years ago

Ongoing PR to address various unit test issues: https://pagure.io/pagure/pull-request/5365
I also run unit tests on F34 and F36 with pip and tox and couldn't observe the reported issue.

Based on the Package name python3-tox-3.14.3-1.fc32.noarch I guess @churchyard you run into that issue on F32? I assume you using a different version in the meantime? Did the problem came up again?

OK thanks, then let's close this issue for now, it doesn't look like the problem comes up in newer versions.

Metadata Update from @wombelix:
- Issue close_status updated to: Won't Fix
- Issue status updated to: Closed (was: Open)

2 years ago

Indeed:

[pagure (master)]$ rpm -q tox
tox-3.28.0-1.fc37.noarch
[pagure (master)]$ tox -l
py35
py36
py37
py38
py39
[pagure (master)]$ tox 
py35 create: /home/churchyard/Dokumenty/RedHat/pagure/.tox/py35
SKIPPED: InterpreterNotFound: python3.5
py36 create: /home/churchyard/Dokumenty/RedHat/pagure/.tox/py36
py36 installdeps: -rrequirements-testing.txt, -rrequirements-ev.txt, python-openid, python-openid-teams, python-openid-cla, pytest-xdist, pytest-cov, pytest
...

Log in to comment on this ticket.

Metadata