[ci][RLlib] [test utils] Improve error message on some test-failures because of IndexError in test_utils.py#54343
Merged
simonsays1980 merged 8 commits intoray-project:masterfrom Sep 18, 2025
Conversation
Signed-off-by: Daraan <github.blurry@9ox.net>
Signed-off-by: Daraan <github.blurry@9ox.net>
Signed-off-by: Daraan <github.blurry@9ox.net>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves error reporting in run_rllib_example_script_experiment by guarding against an IndexError when extracting nested exception messages and falling back to repr(e).
- Adds a safe extraction of
e.args[0].args[2]with a fallback torepr(e)if the tuple is too short. - Fixes a spelling typo in a comment (
criteris→criteria). - Updates the raised
RuntimeErrorto include the newerrorslist.
Comments suppressed due to low confidence (1)
rllib/utils/test_utils.py:1352
- Add a unit test for this fallback branch to ensure that when nested exception
argsare too short, the code uses the fallback behavior as intended.
# Might cause a Index error if Tuple is not long enough in that case use str(e)
IndexError in test_utils.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Daraan <github.blurry@9ox.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Daraan <github.blurry@9ox.net>
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
Contributor
Author
|
(ง •_•)ง stale |
IndexError in test_utils.pyIndexError in test_utils.py
IndexError in test_utils.pyIndexError in test_utils.py
zma2
pushed a commit
to zma2/ray
that referenced
this pull request
Sep 23, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: Zhiqiang Ma <zhiqiang.ma@intel.com>
ZacAttack
pushed a commit
to ZacAttack/ray
that referenced
this pull request
Sep 24, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: zac <zac@anyscale.com>
elliot-barn
pushed a commit
that referenced
this pull request
Sep 24, 2025
…because of `IndexError` in `test_utils.py` (#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
marcostephan
pushed a commit
to marcostephan/ray
that referenced
this pull request
Sep 24, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: Marco Stephan <marco@magic.dev>
elliot-barn
pushed a commit
that referenced
this pull request
Sep 27, 2025
…because of `IndexError` in `test_utils.py` (#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
dstrodtman
pushed a commit
that referenced
this pull request
Oct 6, 2025
…because of `IndexError` in `test_utils.py` (#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
justinyeh1995
pushed a commit
to justinyeh1995/ray
that referenced
this pull request
Oct 20, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
…because of `IndexError` in `test_utils.py` (ray-project#54343) ## Why are these changes needed? In the CI I saw a fleaky test failing, but its error is not reported correctly: ```python [2025-07-04T00:01:57Z] Traceback (most recent call last): [2025-07-04T00:01:57Z] File "/root/.cache/bazel/_bazel_root/1df605deb6d24fc8068f6e25793ec703/execroot/com_github_ray_project_ray/bazel-out/k8-opt/bin/rllib/examples/connectors/multi_agent_observation_preprocessor.runfiles/com_github_ray_project_ray/rllib/examples/connectors/multi_agent_observation_preprocessor.py", line 137, in <module> [2025-07-04T00:01:57Z] run_rllib_example_script_experiment(base_config, args) [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in run_rllib_example_script_experiment [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" [2025-07-04T00:01:57Z] File "/rayci/python/ray/rllib/utils/test_utils.py", line 1354, in <listcomp> [2025-07-04T00:01:57Z] f"{[e.args[0].args[2] for e in results.errors]}" # <--- [2025-07-04T00:01:57Z] IndexError: tuple index out of range # <--- ``` In the logs the actual error does not appear because of the `IndexError` for ` f"{[e.args[0].args[2] for e in results.errors]}"`. I am not sure why `e.args[0].args[2]` is used, a nested Exception perhaps? This PR adds a guard to fallback to a simpler `repr(e)` in case the `IndexError` would accur again. This allows to investigate why this `IndexError` occures and raises the `RuntimeError` like expected. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] This PR is not tested, but improves other tests :) --------- Signed-off-by: Daraan <github.blurry@9ox.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kamil Kaczmarek <kaczmarek.poczta@gmail.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
In the CI I saw a fleaky test failing, but its error is not reported correctly:
In the logs the actual error does not appear because of the
IndexErrorforf"{[e.args[0].args[2] for e in results.errors]}". I am not sure whye.args[0].args[2]is used, a nested Exception perhaps? This PR adds a guard to fallback to a simplerrepr(e)in case theIndexErrorwould accur again. This allows to investigate why thisIndexErroroccures and raises theRuntimeErrorlike expected.Related issue number
NA
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.