Sage error

After a recent update, I get the following error in Sage when I type in a colon (such as in a for or while loop) followed by Enter:

Unhandled exception in event loop:
File “/usr/lib/python3.11/asyncio/events.py”, line 80, in _run
self._context.run(self._callback, *self._args)
File “/usr/lib/python3.11/site-packages/prompt_toolkit/eventloop/utils.py”, line 73, in schedule
func()
File “/usr/lib/python3.11/site-packages/prompt_toolkit/application/application.py”, line 471, in redraw
self._redraw()
File “/usr/lib/python3.11/site-packages/prompt_toolkit/application/application.py”, line 543, in _redraw
self.context.copy().run(run_in_context)
File “/usr/lib/python3.11/site-packages/prompt_toolkit/application/application.py”, line 526, in run_in_context
self.renderer.render(self, self.layout)
File “/usr/lib/python3.11/site-packages/prompt_toolkit/renderer.py”, line 640, in render
layout.container.preferred_height(size.columns, size.rows).preferred,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 318, in preferred_height
dimensions = [
^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 319, in
c.preferred_height(width, max_available_height) for c in self._all_children
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 786, in preferred_height
return self.content.preferred_height(width, max_available_height)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 318, in preferred_height
dimensions = [
^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 319, in
c.preferred_height(width, max_available_height) for c in self._all_children
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 2629, in preferred_height
return self.content.preferred_height(width, max_available_height)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 1611, in preferred_height
return self._merge_dimensions(
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 1639, in _merge_dimensions
preferred = get_preferred()
^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/containers.py”, line 1604, in preferred_content_height
return self.content.preferred_height(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/controls.py”, line 633, in preferred_height
height += content.get_height_for_line(i, width, get_line_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/layout/controls.py”, line 211, in get_height_for_line
to_formatted_text(get_line_prefix(lineno, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/shortcuts/prompt.py”, line 1319, in _get_line_prefix
return self._get_continuation(prompt_width, line_number, wrap_count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/prompt_toolkit/shortcuts/prompt.py”, line 1287, in _get_continuation
continuation: AnyFormattedText = prompt_continuation(
^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/site-packages/IPython/terminal/interactiveshell.py”, line 767, in
self.prompts.continuation_prompt_tokens(width, lineno=lineno)

Exception SagePrompts.continuation_prompt_tokens() got an unexpected keyword argument ‘lineno’

Before the update, it worked perfectly. How can I solve the problem?

tried rebuild that package ?

How does that work? I have Sage from the official extra/sagemath repo.

It’s because of the current ipython package; a fix has been applied upstream, and the Arch package has been flagged out-of-date earlier today.

4 Likes

And the ipython package has been updated to 8.20. You should be all set now.

problem_solved

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.