-
-
Notifications
You must be signed in to change notification settings - Fork 550
"IndexError: list index out of range" when using --devenv flag #2925
Copy link
Copy link
Closed
Labels
bug:normalaffects many people or has quite an impactaffects many people or has quite an impacthelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Description
Issue
Got following error:
tox --devenv venv
Traceback (most recent call last):
File "/Users/xzk/.local/bin/tox", line 8, in <module>
sys.exit(run())
File "/Users/xzk/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/run.py", line 19, in run
result = main(sys.argv[1:] if args is None else args)
File "/Users/xzk/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/run.py", line 45, in main
result = handler(state)
File "/Users/xzk/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/session/cmd/legacy.py", line 108, in legacy
return devenv(state)
File "/Users/xzk/.local/pipx/venvs/tox/lib/python3.9/site-packages/tox/session/cmd/devenv.py", line 38, in devenv
state.conf.memory_seed_loaders[list(opt.env)[0]].append(loader)
IndexError: list index out of range
╰─ which tox
/Users/xzk/.local/bin/tox
Tried to execute with tox installed in my virtual environment myenv
which python3 ─╯
/Users/xzk/workplace/my_project/myenv/bin/python3
╰─ python3 -m tox -vvvv --devenv venv-dev
ROOT: 275 D setup logging to NOTSET on pid 20334 [tox/report.py:221]
Traceback (most recent call last):
File "/Users/xzk/opt/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/xzk/opt/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/xzk/workplace/my_project/myenv/lib/python3.9/site-packages/tox/__main__.py", line 6, in <module>
run()
File "/Users/xzk/workplace/my_project/myenv/lib/python3.9/site-packages/tox/run.py", line 19, in run
result = main(sys.argv[1:] if args is None else args)
File "/Users/xzk/workplace/my_project/myenv/lib/python3.9/site-packages/tox/run.py", line 45, in main
result = handler(state)
File "/Users/xzk/workplace/my_project/myenv/lib/python3.9/site-packages/tox/session/cmd/legacy.py", line 108, in legacy
return devenv(state)
File "/Users/xzk/workplace/my_project/myenv/lib/python3.9/site-packages/tox/session/cmd/devenv.py", line 38, in devenv
state.conf.memory_seed_loaders[list(opt.env)[0]].append(loader)
IndexError: list index out of range
My tox.ini
[tox]
envlist = py39
skip_missing_interpreters = True
[testenv]
deps = -e.[test]
commands = pytest {posargs: ../tests/python_tests}
My setup.py
# setup.py
from setuptools import setup
from setuptools import find_packages
setup(
name='my_pkg',
version='0.1.0',
python_requires=">=3.8.0",
packages=find_packages(),
install_requires=["numpy>=1.24.2", "pandas>=1.5.3", "torch>=1.13.1", "tqdm>=4.64.1", "matplotlib>=3.6.3",
"scikit-learn>=1.2.1", "pyarrow>=11.0.0"],
extras_require=dict(
test=[
'pytest',
]
),
)
Environment
Provide at least:
- OS: MacOS Monterry
pip listof the host Python wheretoxis installed:
╰─ pip list ─╯
Package Version
----------------- --------
attrs 22.2.0
cachetools 5.3.0
chardet 5.1.0
colorama 0.4.6
contourpy 1.0.7
cycler 0.11.0
distlib 0.3.6
exceptiongroup 1.1.0
filelock 3.9.0
fonttools 4.38.0
iniconfig 2.0.0
joblib 1.2.0
kiwisolver 1.4.4
matplotlib 3.6.3
numpy 1.24.2
packaging 23.0
pandas 1.5.3
Pillow 9.4.0
pip 23.0
platformdirs 3.0.0
pluggy 1.0.0
pyarrow 11.0.0
pyparsing 3.0.9
pyproject_api 1.5.0
pytest 7.2.1
pytest-mock 3.10.0
python-dateutil 2.8.2
pytz 2022.7.1
scikit-learn 1.2.1
scipy 1.10.0
setuptools 58.1.0
six 1.16.0
threadpoolctl 3.1.0
tomli 2.0.1
torch 1.13.1
tox 4.4.5
tqdm 4.64.1
typing_extensions 4.4.0
virtualenv 20.19.Output of running tox
Provide the output of tox -rvv:
Please see above.
Minimal example
If possible, provide a minimal reproducer for the issue:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug:normalaffects many people or has quite an impactaffects many people or has quite an impacthelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.Issues that have been acknowledged, a solution determined and a PR might likely be accepted.