A ipython upgrade solves this (somewhat). Jedi upgrade makes the traceback a bit nicer then.

After upgrading I still get an error message, but the sessions recovers itself.

Upgrading ipython and jedi is subject to https://trac.sagemath.org/ticket/31373#comment:1

Here is the remaining traceback, still strange, but only a bit annoying, as at least the session is kept active:

Traceback (most recent call last):
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/cache.py", line 110, in wrapper
    return dct[key]
KeyError: (('get_signature_params',), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/terminal/ptutils.py", line 115, in get_completions     yield from self._get_completions(body, offset, cursor_position, self.ipy_completer)   File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/terminal/ptutils.py", line 131, in _get_completions
    for c in completions:
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/core/completer.py", line 438, in _deduplicate_completions
    completions = list(completions)
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/core/completer.py", line 1827, in completions     for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):   File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/core/completer.py", line 1884, in _completions
    signature = _make_signature(jm)
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/IPython/core/completer.py", line 998, in _make_signature
    return '('+c0.to_string().split('(', maxsplit=1)[1]
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/api/classes.py", line 814, in to_string
    return self._signature.to_string()
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/signature.py", line 31, in to_string
    s = self.name.string_name + '(' + ', '.join(param_strings()) + ')'
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/signature.py", line 13, in param_strings
    for n in self.get_param_names(resolve_stars=True):
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/signature.py", line 52, in get_param_names
    param_names = self._function_value.get_param_names()
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/utils.py", line 16, in wrapper
    return list(func(*args, **kwargs))
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/value.py", line 121, in get_param_names
    signature_params = self.access_handle.get_signature_params()
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/subprocess/__init__.py", line 386, in _workaround
    return self._cached_results(name, *args, **kwargs)
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/cache.py", line 112, in wrapper
    result = method(self, *args, **kwargs)
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/subprocess/__init__.py", line 390, in _cached_results     return self._subprocess.get_compiled_method_return(self.id, name, *args, **kwargs)   File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/subprocess/functions.py", line 27, in get_compiled_method_return
    return getattr(handle.access, attribute)(*args, **kwargs)
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/access.py", line 482, in get_signature_params
    ) for p in self._get_signature().parameters.values()
  File "/srv/public/kliem/sage/local/lib/python3.7/site-packages/jedi/inference/compiled/access.py", line 488, in _get_signature
    return inspect.signature(obj)
  File "/usr/lib/python3.7/inspect.py", line 3083, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "/usr/lib/python3.7/inspect.py", line 2833, in from_callable
    follow_wrapper_chains=follow_wrapped)
  File "/usr/lib/python3.7/inspect.py", line 2288, in _signature_from_callable
    skip_bound_arg=skip_bound_arg)
  File "/usr/lib/python3.7/inspect.py", line 2112, in _signature_from_builtin
    raise ValueError("no signature found for builtin {!r}".format(func))
  File "sage/misc/lazy_import.pyx", line 375, in sage.misc.lazy_import.LazyImport.__repr__ (build/cythonized/sage/misc/lazy_import.c:4134)
    obj = self.get_object()
  File "sage/misc/lazy_import.pyx", line 190, in sage.misc.lazy_import.LazyImport.get_object (build/cythonized/sage/misc/lazy_import.c:2436)
    return self._get_object()
  File "sage/misc/lazy_import.pyx", line 223, in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2715)     self._object = getattr(__import__(self._module, {}, {}, [self._name]), self._name) AttributeError: module 'sage.sandpiles.all' has no attribute 'absolute_import'

Unhandled exception in event loop:

Exception None
Press ENTER to continue...

On 09.02.21 23:44, Dima Pasechnik wrote:
an isolated upgrade to 0.18 probably won't fly.

And indeed, jedi is used in ipython, not only in jupyter. Perhaps one
can update only ipython, and leave jupyter for later?
I don't know.



On Tue, Feb 9, 2021 at 8:23 PM 'jonatha...@googlemail.com' via
sage-devel <sage-devel@googlegroups.com> wrote:
Downgrading to jedi 0.15, I instead get the error (after long wait time)

/usr/lib/python3.7/inspect.py:718: DeprecationWarning: sage.interacts.debugger 
is deprecated because it is meant for the deprecated Sage Notebook
See https://trac.sagemath.org/27531 for details.
   if hasattr(object, '__module__'):

All rather strange to me. To be clear. I'm not using jupyter, I'm just on the 
shell.

jonatha...@googlemail.com schrieb am Dienstag, 9. Februar 2021 um 21:10:49 
UTC+1:
The jedi upgrade (to 0.18.0) does not fix the error, but does change the log:



jonatha...@googlemail.com schrieb am Dienstag, 9. Februar 2021 um 21:05:20 
UTC+1:
Actually the error is reproducible:

     def foo(): return 2
     foo()
     foo()

What makes it crash is hitting TAB after opening the parenthesis and then 
completing it and hitting enter.

Matthias Koeppe schrieb am Dienstag, 9. Februar 2021 um 17:56:31 UTC+1:
A Jupyter upgrade is in https://trac.sagemath.org/ticket/31280 - which needs 
some help

On Tuesday, February 9, 2021 at 6:52:51 AM UTC-8 Dima Pasechnik wrote:
it looks like https://github.com/davidhalter/jedi/issues/1615
and our version of jedi is older than the fix there.
Upgrade jedi (if this is possible without a full ipython/jupyter
upgrade, don't know) ?

On Tue, Feb 9, 2021 at 1:56 PM 'jonatha...@googlemail.com' via
sage-devel <sage-...@googlegroups.com> wrote:

Dear all,

sage crashes once in a while hard with some strange error.

Does anyone know what is going on? This is somewhat new. Not reproducible.

Happened to me maybe 3 or 4 times now at various occasions.

Jonathan

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/53367a09-45ff-4ebf-bcca-88766b0b77e9n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d4e347a9-ead5-401e-906b-7159ebd2679fn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/e81cf8e2-adf8-0794-6436-4c7cf29f98ae%40gmail.com.

Reply via email to