Bug 375467 - Cantor hangs at "Initializing Session" when choosing Sage backend (Sage version 7.6)
Summary: Cantor hangs at "Initializing Session" when choosing Sage backend (Sage versi...
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: sage-backend (show other bugs)
Version: 16.12
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 20:22 UTC by Jacob
Modified: 2018-07-01 18:39 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.04.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob 2017-01-23 20:22:16 UTC
I'm using Cantor 16.12.1 with Sagemath 7.5 on Manjaro Testing. When choosing the Sage backend cantor will hang on "Initiaizing session" forever. I've let it wait for 10 minutes and it does not progress. Sage works fine in the terminal, and Cantor is looking for sage in /usr/bin/sage.

Here is Cantor's stderr output:

dir:  "/usr/lib/qt/plugins/cantor/backends"
Error while loading plugin:  "."
Error while loading plugin:  ".."
Error while loading plugin:  "cantor_luabackend.so"
Creating MaximaBackend
Creating NullBackend
Creating PythonBackend
Creating PythonBackend
Creating RBackend
Creating SageBackend
Creating ScilabBackend
dir:  "/usr/bin/cantor/backends"
Created a CantorPart
Backend  "Sage"  offers extensions:  ("HistoryExtension", "ScriptExtension", "CASExtension", "CalculusExtension", "LinearAlgebraExtension", "PlotExtension", "PackagingExtension")
Spawning a new Sage session
new worksheetaccess interface
()
()
()
()
()
()
()
()
()
()
()
()
(QKeySequence("Ctrl+Shift+S"))
(QKeySequence("Ctrl+S"))
()
(QKeySequence("Ctrl+Z"))
(QKeySequence("Ctrl+Shift+Z"))
(QKeySequence("Ctrl+X"), QKeySequence("Shift+Del"))
(QKeySequence("Ctrl+C"), QKeySequence("Ctrl+Ins"))
(QKeySequence("Ctrl+V"), QKeySequence("Shift+Ins"))
(QKeySequence("Ctrl+F"))
(QKeySequence("Ctrl+R"))
(QKeySequence("F3"))
(QKeySequence("Shift+F3"))
()
(QKeySequence("Ctrl+P"))
()
(QKeySequence("Ctrl++"), QKeySequence("Ctrl+="))
(QKeySequence("Ctrl+-"))
()
()
()
()
()
()
()
(QKeySequence("Shift+Return"))
(QKeySequence("Ctrl+Return"))
()
()
()
()
(QKeySequence("Shift+Del"))
()
()
()
()
loading assistants...
dir:  "/usr/lib/qt/plugins/cantor/assistants"
Error while loading assistant:  "."
Error while loading assistant:  ".."
plugin  "AdvancedPlot"  requires  ("AdvancedPlotExtension")
plugin  "AdvancedPlot"  is   not   supported by  "Sage"
plugin  "Create Matrix"  requires  ("LinearAlgebraExtension")
plugin  "Create Matrix"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_create_matrix_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Differentiate"  requires  ("CalculusExtension")
plugin  "Differentiate"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_differentiate_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Eigenvalues"  requires  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Eigenvalues"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_eigenvalues_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Eigenvectors"  requires  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Eigenvectors"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_eigenvectors_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Import Package"  requires  ("PackagingExtension")
plugin  "Import Package"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_import_package_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Integrate"  requires  ("CalculusExtension")
plugin  "Integrate"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_integrate_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Invert Matrix"  requires  ("LinearAlgebraExtension", "HistoryExtension")
plugin  "Invert Matrix"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_invert_matrix_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Plot2d"  requires  ("PlotExtension")
plugin  "Plot2d"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_plot2d_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Plot3d"  requires  ("PlotExtension")
plugin  "Plot3d"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_plot3d_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "QalculatePlot"  requires  ("QalculatePlotExtension")
plugin  "QalculatePlot"  is   not   supported by  "Sage"
plugin  "RunScript"  requires  ("ScriptExtension")
plugin  "RunScript"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_runscript_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
plugin  "Solve"  requires  ("CASExtension")
plugin  "Solve"  is    supported by  "Sage"
KXMLGUI file found at deprecated location ("/usr/share/cantor/cantor_solve_assistant.rc") -- please use ${KXMLGUI_INSTALL_DIR} to install this file instead.
dir:  "/usr/bin/cantor/assistants"
loading panel plugins for session of type  "Sage"
dir:  "/usr/lib/qt/plugins/cantor/panels"
Error while loading panel:  "."
Error while loading panel:  ".."
plugin  "Help"  requires  ("")
Requesting capabilities of SageSession
plugin  "Help"  is    supported
setting session to  0xae43b0
plugin  "Variable Manager"  requires  ("VariableManagementExtension")
plugin  "Variable Manager"  is   not   supported
dir:  "/usr/bin/cantor/panels"
Requesting capabilities of SageSession
Requesting capabilities of SageSession
login
evaluating:  "__cantor_enable_typesetting(false)"
evaluating  "__cantor_enable_typesetting(false)"
wsStatusChange 0
out:  "â\u0094\u008Câ\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0090\r\nâ\u0094\u0082 SageMath version 7.5, Release Date: 2017-01-11                     â\u0094\u0082\r\nâ\u0094\u0082 Type \"notebook()\" for the browser-based notebook interface.        â\u0094\u0082\r\nâ\u0094\u0082 Type \"help()\" for help.                                            â\u0094\u0082\r\nâ\u0094\u0094â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0098\r\n"
found version:  ("7.5", "7", "5")
using the current set of commands
out:  "â\u0094\u008Câ\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0090\r\nâ\u0094\u0082 SageMath version 7.5, Release Date: 2017-01-11                     â\u0094\u0082\r\nâ\u0094\u0082 Type \"notebook()\" for the browser-based notebook interface.        â\u0094\u0082\r\nâ\u0094\u0082 Type \"help()\" for help.                                            â\u0094\u0082\r\nâ\u0094\u0094â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0098\r\n\u001B]0;IPython: home/jj\u0007"
found version:  ("7.5", "7", "5")
using the current set of commands
out:  "â\u0094\u008Câ\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0090\r\nâ\u0094\u0082 SageMath version 7.5, Release Date: 2017-01-11                     â\u0094\u0082\r\nâ\u0094\u0082 Type \"notebook()\" for the browser-based notebook interface.        â\u0094\u0082\r\nâ\u0094\u0082 Type \"help()\" for help.                                            â\u0094\u0082\r\nâ\u0094\u0094â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0098\r\n\u001B]0;IPython: home/jj\u0007\u001B[?1l\u001B[6n"
found version:  ("7.5", "7", "5")
using the current set of commands
out:  "â\u0094\u008Câ\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0090\r\nâ\u0094\u0082 SageMath version 7.5, Release Date: 2017-01-11                     â\u0094\u0082\r\nâ\u0094\u0082 Type \"notebook()\" for the browser-based notebook interface.        â\u0094\u0082\r\nâ\u0094\u0082 Type \"help()\" for help.                                            â\u0094\u0082\r\nâ\u0094\u0094â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0080â\u0094\u0098\r\n\u001B]0;IPython: home/jj\u0007\u001B[?1l\u001B[6n\u001B[?2004h\u001B[?25l\u001B[?7l\u001B[0m\r\u001B[0m\u001B[J\r\u001B[0m\u001B[?12l\u001B[?25h\u001B[?25l\r\u001B[0m\u001B[J\r\u001B[J\u001B[?7h\u001B[0m\u001B[?12l\u001B[?25h\u001B[?2004l\u001B[?1l\u001B[6n\u001B[?2004h\u001B[?25l\u001B[?7l\u001B[0m\r\u001B[0m\u001B[J\r\u001B[0m\u001B[?12l\u001B[?25h\u001B[?25l\r\u001B[0m\u001B[?12l\u001B[?25h"
found version:  ("7.5", "7", "5")
using the current set of commands
QObject::disconnect: Unexpected null parameter
Shortcut for action  "format_text_bold" "&Bold" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "format_text_italic" "&Italic" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "format_text_underline" "&Underline" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "format_text_strikeout" "&Strike Out" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "evaluate_current" "Evaluate Entry" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "insert_command_entry" "Insert Command Entry" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "remove_current" "Remove current Entry" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
Shortcut for action  "show_completion" "Show Completion" set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.
updating panels
adding panel for  "Help"
logout
SAGE_TMP_ROOT = /home/jj/.sage/temp/jacob-Thinkpad
Starting sage-cleaner with PID 23997
Checking PIDs [23833]
Process 23833 is no longer running, so we clean up
Deleting /home/jj/.sage/temp/jacob-Thinkpad/23833
Checking PIDs []
cleanup() #2 took 0.00s
Checking PIDs []
cleanup() #3 took 0.00s
Checking PIDs []
cleanup() #4 took 0.00s
Checking PIDs []
cleanup() #5 took 0.00s
Checking PIDs []
cleanup() #6 took 0.00s
Checking PIDs []
cleanup() #7 took 0.00s
Checking PIDs []
cleanup() #8 took 0.00s
Checking PIDs []
cleanup() #9 took 0.00s
Checking PIDs []
cleanup() #10 took 0.00s
sage-cleaner is finished
Removing pidfile and logfile
Comment 1 Filipe Saraiva 2017-04-29 13:49:22 UTC
I can not find Sage 7.5 to download. Is this bug present when you use Sage 7.6?
Comment 2 hackitforfun 2017-04-29 15:52:57 UTC
I can confirm sage 7.6 and cantor 17.04 not working in arch linux
Comment 3 Filipe Saraiva 2017-04-29 15:54:18 UTC
(In reply to hackitforfun from comment #2)
> I can confirm sage 7.6 and cantor 17.04 not working in arch linux

Thanks hackitforfun I will give a look in it.
Comment 4 Filipe Saraiva 2017-04-30 21:21:19 UTC
I can confirm the bug.
Comment 5 Antonio Rojas 2017-05-23 07:00:23 UTC
This is caused by the ipython 5.0 upgrade. There are (at least) two issues here:

- Ipython 5.0 uses prompt_toolkit instead of readline. By default it has prompt and syntax highlighting enabled, which breaks the Cantor parser (it can't interpret the ANSI codes correctly). This could be fixed on the Sage side by forcing it to run ipython with the --simple-prompt flag

- Even with the --simple-prompt flag, ipython 5.0 doesn't accept multiline input anymore. This breaks passing the initialization commands to Sage. This is being tracked upstream at https://github.com/ipython/ipython/issues/9816
Comment 6 Kishore Gopalakrishnan 2017-11-23 14:35:09 UTC
(In reply to Antonio Rojas from comment #5)
> This is caused by the ipython 5.0 upgrade. There are (at least) two issues
> here:
> 
> - Ipython 5.0 uses prompt_toolkit instead of readline. By default it has
> prompt and syntax highlighting enabled, which breaks the Cantor parser (it
> can't interpret the ANSI codes correctly). This could be fixed on the Sage
> side by forcing it to run ipython with the --simple-prompt flag
> 
> - Even with the --simple-prompt flag, ipython 5.0 doesn't accept multiline
> input anymore. This breaks passing the initialization commands to Sage. This
> is being tracked upstream at https://github.com/ipython/ipython/issues/9816

The multiline input issue seems to be fixed (https://github.com/ipython/ipython/pull/10606). What changes would I need to make to my installation of sage and/or cantor to get it to run ipython with the --simple-prompt option? 

With Cantor 17.08.3 and sage 8.0 on Arch linux, if I run 'cantor -b sage' from a terminal, there is no terminal output, and Cantor opens, but keeps on showing the 'initialising Session' dialog box.
Comment 7 Alexander Semke 2018-05-05 12:42:39 UTC
(In reply to Kishore Gopalakrishnan from comment #6)
> (In reply to Antonio Rojas from comment #5)
> 
> With Cantor 17.08.3 and sage 8.0 on Arch linux, if I run 'cantor -b sage'
> from a terminal, there is no terminal output, and Cantor opens, but keeps on
> showing the 'initialising Session' dialog box.
The communication with Sage was made more stable in 18.04. Can you please check the current release? Do you still have problems with Sage?
Comment 8 Antonio Rojas 2018-05-05 17:52:41 UTC
No, this still doesn't work. Major changes are needed to work with newer versions of Sage (newer than 2 years) in Sage itself (so that it allows running ipython in simple prompt mode), in ipython (i think those are already merged) and in Cantor (to adapt to latest ipython versions using prompt_toolkit instead of readline).
Comment 9 Kishore Gopalakrishnan 2018-05-06 00:37:29 UTC
(In reply to Alexander Semke from comment #7)
> (In reply to Kishore Gopalakrishnan from comment #6)
> > (In reply to Antonio Rojas from comment #5)
> > 
> > With Cantor 17.08.3 and sage 8.0 on Arch linux, if I run 'cantor -b sage'
> > from a terminal, there is no terminal output, and Cantor opens, but keeps on
> > showing the 'initialising Session' dialog box.
> The communication with Sage was made more stable in 18.04. Can you please
> check the current release? Do you still have problems with Sage?

With Cantor 18.04 and sage version 8.1 on Arch Linux, it now indefinitely has 'calculating...' displayed in the status bar after I enter any sage command in a cell and press shift+enter. No results are displayed, even if I do simple stuff like '2+3 <shift+enter>'. I.e., the sage backend is still completely unusable, although it now seems to start up without any obvious error dialog displayed.
Comment 10 Nikita Sirgienko 2018-05-10 19:29:52 UTC
I suspect, that this is still a problem with multiline input with ipython. I have tested sage backend with changed process ('maxima', 'octave-cli', 'mathjs', 'python', 'nodejs') and all of them read multiline input from backend correctly and only ipython and sage read only first line of the multiline input.
Comment 11 Nikita Sirgienko 2018-05-14 14:56:48 UTC
Could anybody confirm, that changing in 262 line of sage of this

exec sage-ipython "$@" -i 

by this

exec sage-ipython --simple-prompt "$@" -i 

solve the login sage problem?
Comment 12 Antonio Rojas 2018-05-14 15:02:59 UTC
(In reply to Nikita Sirgienko from comment #11)
> Could anybody confirm, that changing in 262 line of sage of this
> 
> exec sage-ipython "$@" -i 
> 
> by this
> 
> exec sage-ipython --simple-prompt "$@" -i 
> 
> solve the login sage problem?

It does, indeed. (Sage 8.2, ipython 5.6.0)
Comment 13 Nikita Sirgienko 2018-05-14 16:55:11 UTC
(In reply to Antonio Rojas from comment #12)
> It does, indeed. (Sage 8.2, ipython 5.6.0)
Well, thanks for report.
Now, this changes in sage file fix this bug, but you lose color in sage output.
So, I create feature request ticket for Sage:
https://trac.sagemath.org/ticket/25363
If the ticket will be accepted (for example, in sage 8.3), I add version dependent fix, which will be fix sage backend for sage >= 8.3 (but sage < 8.3 still be broken) without color losing in sage output.

I also maybe report prompt_toolkit about problem with multiline input for (pseudo)terminal devices. However, it also fix the sage backend only for future versions

Theoretically, If there is way to run 'sage-ipython' directly, without sage bash file, I guess, that I could fix this bug for all sage versions, but I am not sure.
Comment 14 Antonio Rojas 2018-05-14 17:07:28 UTC
(In reply to Nikita Sirgienko from comment #13)
> Theoretically, If there is way to run 'sage-ipython' directly, without sage
> bash file, I guess, that I could fix this bug for all sage versions, but I
> am not sure.

Running sage-ipython directly should work fine, the problem is finding where the binary is installed. You can get the location of the SAGE_LOCAL dir with

sage -c "from sage.env import SAGE_LOCAL; print SAGE_LOCAL"

and the sage-ipython should be located in $SAGE_LOCAL/bin
Comment 15 Nikita Sirgienko 2018-05-14 17:16:47 UTC
(In reply to Antonio Rojas from comment #14)
> (In reply to Nikita Sirgienko from comment #13)
> > Theoretically, If there is way to run 'sage-ipython' directly, without sage
> > bash file, I guess, that I could fix this bug for all sage versions, but I
> > am not sure.
> 
> Running sage-ipython directly should work fine, the problem is finding where
> the binary is installed. You can get the location of the SAGE_LOCAL dir with
> 
> sage -c "from sage.env import SAGE_LOCAL; print SAGE_LOCAL"
> 
> and the sage-ipython should be located in $SAGE_LOCAL/bin
$ sage -c "from sage.env import SAGE_LOCAL; print SAGE_LOCAL" 
gives '/usr/' for me, and sage-ipython locate in '/usr/share/sagemath/bin', so it's not so simple.

That worse, sage-ipython fails for me with this trackeback:
Traceback (most recent call last):
  File "./sage-ipython", line 7, in <module>
    from sage.repl.interpreter import SageTerminalApp
  File "/usr/lib/python2.7/dist-packages/sage/repl/interpreter.py", line 112, in <module>
    from sage.env import SAGE_LOCAL
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 123, in <module>
    _add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 103, in _add_variable_or_fallback
    value = sep.join(components)
TypeError: sequence item 0: expected string, NoneType found

And I don't understand, how I can fix it and run sage-ipython correctly. I guess, that sage bash file set up environment for sage-ipython, and we need also do it before directly run sage-ipython.
Comment 16 Alexander Semke 2018-05-15 15:52:48 UTC
(In reply to Nikita Sirgienko from comment #13)
> (In reply to Antonio Rojas from comment #12)
> > It does, indeed. (Sage 8.2, ipython 5.6.0)
> Well, thanks for report.
> Now, this changes in sage file fix this bug, but you lose color in sage
> output.
> So, I create feature request ticket for Sage:
> https://trac.sagemath.org/ticket/25363
> If the ticket will be accepted (for example, in sage 8.3), I add version
> dependent fix, which will be fix sage backend for sage >= 8.3 (but sage <
> 8.3 still be broken) without color losing in sage output.
> 
> I also maybe report prompt_toolkit about problem with multiline input for
> (pseudo)terminal devices. However, it also fix the sage backend only for
> future versions
> 
> Theoretically, If there is way to run 'sage-ipython' directly, without sage
> bash file, I guess, that I could fix this bug for all sage versions, but I
> am not sure.
Wouldn't it be better if the main sage bash script would simply forward the CLI parameters to sage-ipython. With this we'd simply always call sage with --simple-promt or the user will provide this parameter explicitly in cantor settings for sage where the user already has to specify the path for sage. With this solution it would be up to the sage's user/frontend to specify this parameter or not and there is no need to always use it as proposed in your trac ticket.
Comment 17 Nikita Sirgienko 2018-05-15 16:11:06 UTC
(In reply to Alexander Semke from comment #16)
> Wouldn't it be better if the main sage bash script would simply forward the
> CLI parameters to sage-ipython. With this we'd simply always call sage with
> --simple-promt or the user will provide this parameter explicitly in cantor
> settings for sage where the user already has to specify the path for sage.
> With this solution it would be up to the sage's user/frontend to specify
> this parameter or not and there is no need to always use it as proposed in
> your trac ticket.
Alexender, I reread my ticket message and maybe I was not quite accurate.
The ticket suggest add new option (--simple-prompt), that be passed to ipython, like another ipython forward options for sage.
So if you run 'sage --simple-prompt' you have sage with ipython with --simple-prompt option and Sage backend could work with sage output.
If you don't specify this option, sage don't forward pass '--simple-prompt' to ipython and then ipython starts with default input handler: prompt_tookit.
Sage don't send -gthread, -qthread, -q4thread, -wthread and -pylab always to sage-ipython. Sage do it, only if user specify corresponding options. And my ticket just expand list of this options by adding new option (and new corresponding option too).
Comment 18 Alexander Semke 2018-05-16 16:01:16 UTC
(In reply to Nikita Sirgienko from comment #17)
> Alexender, I reread my ticket message and maybe I was not quite accurate.
> The ticket suggest add new option (--simple-prompt), that be passed to
> ipython, like another ipython forward options for sage.
> So if you run 'sage --simple-prompt' you have sage with ipython with
> --simple-prompt option and Sage backend could work with sage output.
> If you don't specify this option, sage don't forward pass '--simple-prompt'
> to ipython and then ipython starts with default input handler: prompt_tookit.
> Sage don't send -gthread, -qthread, -q4thread, -wthread and -pylab always to
> sage-ipython. Sage do it, only if user specify corresponding options. And my
> ticket just expand list of this options by adding new option (and new
> corresponding option too).
Ok, got it now. Thanks for the clarification.
Comment 19 Nikita Sirgienko 2018-06-23 08:42:51 UTC
Now, on master branch, Cantor have patch for sage login for versions 8.1 and 8.2 (I think the patch also can work with future 8.3 version)
I will want to add this patch in 18.04.3 release, but it will be usefull, if this patch will be tested before release not only by developers.
Could anybody with Sage 8.1 or 8.2 builds Cantor from source code and confirm, that login starts work correctly?
Comment 20 Kishore Gopalakrishnan 2018-06-23 09:40:08 UTC
(In reply to Nikita Sirgienko from comment #19)
> Now, on master branch, Cantor have patch for sage login for versions 8.1 and
> 8.2 (I think the patch also can work with future 8.3 version)
> I will want to add this patch in 18.04.3 release, but it will be usefull, if
> this patch will be tested before release not only by developers.
> Could anybody with Sage 8.1 or 8.2 builds Cantor from source code and
> confirm, that login starts work correctly?

Cantor built from source works on Arch with sagemath version 8.2.
Comment 21 Nikita Sirgienko 2018-07-01 18:39:32 UTC
Git commit f071930f73d9c73fcf720f4f105a915810c3cb58 by Nikita Sirgienko.
Committed on 01/07/2018 at 18:16.
Pushed by sirgienko into branch 'Applications/18.04'.

Fix broken sage login for Sage versions greater, than 8.0 (8.1, 8.2, 8.3, etc.) and set version 8.1 and 8.2 as recommends.
FIXED-IN: 18.04.3

M  +5    -0    src/backends/sage/CMakeLists.txt
A  +13   -0    src/backends/sage/cantor-execsage
M  +1    -1    src/backends/sage/sagebackend.cpp
M  +49   -20   src/backends/sage/sagesession.cpp
M  +1    -0    src/backends/sage/sagesession.h

https://commits.kde.org/cantor/f071930f73d9c73fcf720f4f105a915810c3cb58