File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,17 @@ REFRESH."
7676 (or (and (not refresh) (gethash host jupyter--kernelspecs))
7777 (let ((specs
7878 (plist-get
79- (let ((json (or (jupyter-command " kernelspec" " list"
79+ (let* ((json-result (or (jupyter-command " kernelspec" " list"
8080 " --json" " --log-level" " ERROR" )
8181 (error " \
82- Can't obtain kernelspecs from jupyter shell command " ))))
82+ Can't obtain kernelspecs from jupyter shell command " )))
83+ (_ (string-match " {.*}" json-result))
84+ (json-start (car (match-data )))
85+ (json-end (cadr (mathc-data)))
86+ (json (substring json-result json-start json-end)))
87+ (when (> json-start 0 )
88+ (warn " Getting kernelspec has warning(s):"
89+ (substring json-result 0 json-start)))
8390 (condition-case nil
8491 (jupyter-read-plist-from-string json)
8592 (error
You can’t perform that action at this time.
0 commit comments