robert-dodier/maxima-jupyter

Can't quit from the jupyter console?

nations-Xiong opened this issue · 8 comments

When I type quit();, it gives me a message like this:

[Condition of type JUPYTER:QUIT-CONDITION]

#<ENVIRONMENT {1006295BD3}>
   [Environment of thread #<THREAD "SHELL Thread" RUNNING {1005060213}>]


Backtrace:
 5: (SB-KERNEL::%SIGNAL )
 6: (ERROR )
 7: ((LAMBDA (ORIG &REST ARGS) :IN "/usr/share/maxima-jupyter/local-projects/maxima-jupyter/src/overrides.lisp") #<unused argument>)
 8: ((LAMBDA (&REST MAXIMA-JUPYTER::ARGS)))
 9: (MEVAL1 #<unavailable argument>)
 10: (MEVAL (($QUIT)))
 11: (MEVALARGS (NIL (($QUIT))))
 12: (MEVAL1 ((DISPLAYINPUT) NIL (($QUIT))))
 13: (MEVAL ((DISPLAYINPUT) NIL (($QUIT))))
 14: (MEVAL* ((DISPLAYINPUT) NIL (($QUIT))))
 15: (MAXIMA-JUPYTER::MY-EVAL ((DISPLAYINPUT) NIL (($QUIT))))
 16: (MAXIMA-JUPYTER::READ-AND-EVAL #<KERNEL {1003D14523}> #<STRING-INPUT-STREAM {1006075443}> T)
 17: ((:METHOD JUPYTER:EVALUATE-CODE (MAXIMA-JUPYTER::KERNEL T)) #<KERNEL {1003D14523}> quit();)
 18: (JUPYTER::HANDLE-EXECUTE-REQUEST #<KERNEL {1003D14523}> #<MESSAGE {1005DFB623}>)
 19: (JUPYTER::HANDLE-SHELL-MESSAGE #<KERNEL {1003D14523}> #<MESSAGE {1005DFB623}>)
 20: (JUPYTER::RUN-SHELL #<KERNEL {1003D14523}>)
 21: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
 22: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 23: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-THREAD::RUN))
 24: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
 25: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::RUN))
 26: (SB-THREAD::RUN)
 27: ("foreign function: call_into_lisp")
 28: ("foreign function: funcall1")

This is probably a bug in common-lisp-jupyter. I'll look into it.

You can also exit from the console with Ctrl+D usually.

This is probably a bug in common-lisp-jupyter. I'll look into it.

You can also exit from the console with Ctrl+D usually.

I've tried. But Ctrl+D does not work either. The only to quit it is close the terminal.

Are you running the terminal from inside JupyterLab or via an actual terminal?

Are you running the terminal from inside JupyterLab or via an actual terminal?

Actual terminal. The command I run: jupyter console --kernel=maxima

I have a potential fix in the works. Have to make some changes to common-lisp-jupyter also so it will not work until quicklisp updates unless you make put common-lisp-jupyter into local-projects.

@yitzchak So what should I do?

Submitted a PR. Once the PR is accepted you will need to either wait for quicklisp to update common-lisp-jupyter which is usually about once a month or clone yitzchak/common-lisp-jupyter into ~/quicklisp/local-projects

Thanks, Tarn. I've accepted the PR.