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."
76
76
(or (and (not refresh) (gethash host jupyter--kernelspecs))
77
77
(let ((specs
78
78
(plist-get
79
- (let ((json (or (jupyter-command " kernelspec" " list"
79
+ (let* ((json-result (or (jupyter-command " kernelspec" " list"
80
80
" --json" " --log-level" " ERROR" )
81
81
(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)))
83
90
(condition-case nil
84
91
(jupyter-read-plist-from-string json)
85
92
(error
You can’t perform that action at this time.
0 commit comments