getappmap / getappmap/appmap-python

IndexError: tuple index out of range

Open
#322 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
104
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Found in sympy v1.0 test cases.

Traceback (most recent call last):
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/utilities/runtests.py", line 1130, in wrapper
    test_func()
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/functions/special/tests/test_zeta_functions.py", line 95, in test_derivatives
    assert zeta(x, a).diff(x) == Derivative(zeta(x, a), x)
  File "/home/db/dev/applandinc/appmap-python/_appmap/wrapt/wrappers.py", line 712, in __call__
    return self._self_wrapper(self.__wrapped__, self._self_instance,
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 129, in instrumented_fn
    return call_instrumented(f, instance, args, kwargs)
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 92, in call_instrumented
    ret = f.fn(*args, **kwargs)
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/core/expr.py", line 2949, in diff
    return Derivative(self, *new_symbols, **assumptions)
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/core/function.py", line 1187, in __new__
    obj = expr._eval_derivative(v)
  File "/home/db/dev/applandinc/appmap-python/_appmap/wrapt/wrappers.py", line 712, in __call__
    return self._self_wrapper(self.__wrapped__, self._self_instance,
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 129, in instrumented_fn
    return call_instrumented(f, instance, args, kwargs)
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 92, in call_instrumented
    ret = f.fn(*args, **kwargs)
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/core/function.py", line 559, in _eval_derivative
    df = self.fdiff(i)
  File "/home/db/dev/applandinc/appmap-python/_appmap/wrapt/wrappers.py", line 712, in __call__
    return self._self_wrapper(self.__wrapped__, self._self_instance,
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 129, in instrumented_fn
    return call_instrumented(f, instance, args, kwargs)
  File "/home/db/dev/applandinc/appmap-python/_appmap/instrument.py", line 103, in call_instrumented
    event.ExceptionEvent(
  File "/home/db/dev/applandinc/appmap-python/_appmap/event.py", line 509, in __init__
    {"class": fqname(class_), "message": str(exc), "object_id": id(exc)}
  File "/tmp/tmpz56qw_4w/sympy__sympy__1.0/sympy/core/function.py", line 94, in __str__
    (self.args[1], self.args[0]))
IndexError: tuple index out of range

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with _appmap/event.py around line 509 and the exception-handling path in _appmap/instrument.py. Reproduce the failure by running SymPy v1.0's test_zeta_functions.py test_derivatives case. Done means the reported IndexError no longer occurs while handling that exception and the test completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.