Closed jasontuna closed 3 years ago
How attached are you to your $HOME/.jupyter/jupyter_notebook_config.py
? If not at all, or if you don't even know what that is, perhaps you could:
mv $HOME/.jupyter/jupyter_notebook_config.py $HOME/.jupyter/backup.jupyter_notebook_config.py
jupyter notebook --generate-config
jupyter kernelspec list --json
If that last command, returns valid json, then you are home free.
How attached are you to your
$HOME/.jupyter/jupyter_notebook_config.py
? If not at all, or if you don't even know what that is, perhaps you could:mv $HOME/.jupyter/jupyter_notebook_config.py $HOME/.jupyter/backup.jupyter_notebook_config.py jupyter notebook --generate-config jupyter kernelspec list --json
If that last command, returns valid json, then you are home free.
Prior to ticket submission, I had already deleted it, and generated a new config. The error is that when running
jupyter kernelspec list --json
for many installations, the output will have a warning prior to valid json in the beginning. For me it is,
*[ListKernelSpecs]* WARNING | Config option kernel_spec_manager_class
not recognized by ListKernelSpecs
.
prior to outputting valid JSON.
In particular, ein assumes that "jupyter kernelspec list --json" will always output json. Sure I can delete the associated jupyter_config.json which was installed by anaconda that has { "JupyterApp": { "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager" } } which is the offending kernelspec, but it would seem warnings should not break the installation. Of course it would make more sense for "jupyter kernelspec list --json" to output json according to spec also ...
Given most users, including myself, are inclined to fire-and-forget github issues, I sort of make a summary judgment and preemptively close them out. But yes, emacs should disregard the stderr of those jupyter cli calls. Commit 147940d
Problem description
Any attempt to start a notebook server or logging into a server started in a terminal, e.g., through calling 1] ein:run 2] ein:login 3] C-c C-o with an open ipynb file 4] or other calls using ein:notebook...
results in a similar error.
I have cleaned out any jupyter notebook settings. I have also used emacs 27, and 28. I have cleaned out my init, reinstalled everything, etc... I have also tried setting a password for the notebook, and that did not help either.
It seems that json-parse-string is erroring out on "[NbserverListApp] WARNING | Config option
kernel_spec_manager_class
not recognized byNbserverListApp
." :object-type plist :array-type array :null-object nil :false-object :json-falseSteps to reproduce the problem
calling any interaction, or creating a notebook results in the debugger output;
Debugger entered--Lisp error: (json-parse-error "invalid token near 'NbserverListApp'" "" 1 16 16)
json-parse-string("[NbserverListApp] WARNING | Config option
kernel_spec_manager_class
not recognized byNbserverListApp
." :object-type plist :array-type array :null-object nil :false-object :json-false) ein:jupyter-crib-running-servers() ein:notebooklist-ask-url-or-port() byte-code("\301 \302\10\205\n\0\303\304!\10\205\21\0\303\305!\306BBBB\207" [current-prefix-arg ein:notebooklist-ask-url-or-port #f(compiled-function (buffer url-or-port) #<bytecode 0x100e3dd>) read-no-blanks-input "Cookie name: " "Cookie content: " (nil)] 5) call-interactively(ein:login record nil) command-execute(ein:login record) execute-extended-command(nil "ein:login" "ein:login") funcall-interactively(execute-extended-command nil "ein:login" "ein:login") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)System info:
Logs:
ein:log-all: