mirror of
https://github.com/powerline/powerline.git
synced 2025-07-25 23:05:32 +02:00
Ease E858/E860 errors debugging
E858: Eval did not return a valid python object E860: Eval did not return a valid python 3 object
This commit is contained in:
parent
df7d0f2041
commit
c45747a3b8
@ -30,3 +30,17 @@ My vim statusline is hidden/only appears in split windows!
|
|||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
* Make sure that you have ``set laststatus=2`` in your :file:`vimrc`.
|
* Make sure that you have ``set laststatus=2`` in your :file:`vimrc`.
|
||||||
|
|
||||||
|
I get E858/E860 error in vim (Eval did not return a valid python object)
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* You need to make ``pyeval()`` display python stack trace. There is currently
|
||||||
|
a patch for this, but it was not merged into main vim tree, thus you will have
|
||||||
|
to use different approach: reproduce the error with
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
vim --cmd "let g:powerline_debugging_pyeval=1" ...
|
||||||
|
|
||||||
|
and then use the stack trace to search for existing issues or to create a new
|
||||||
|
one.
|
||||||
|
@ -38,13 +38,13 @@ catch
|
|||||||
endtry
|
endtry
|
||||||
exec s:powerline_pycmd 'powerline = Powerline("vim", segment_info={})'
|
exec s:powerline_pycmd 'powerline = Powerline("vim", segment_info={})'
|
||||||
|
|
||||||
if exists('*'. s:powerline_pyeval)
|
if !get(g:, 'powerline_debugging_pyeval') && exists('*'. s:powerline_pyeval)
|
||||||
let s:pyeval = function(s:powerline_pyeval)
|
let s:pyeval = function(s:powerline_pyeval)
|
||||||
else
|
else
|
||||||
exec s:powerline_pycmd 'import json, vim'
|
exec s:powerline_pycmd 'import json, vim'
|
||||||
function! s:pyeval(e)
|
exec "function! s:pyeval(e)\n".
|
||||||
exec s:powerline_pycmd 'vim.command("return " + json.dumps(eval(vim.eval("a:e"))))'
|
\ s:powerline_pycmd." vim.command('return ' + json.dumps(eval(vim.eval('a:e'))))\n".
|
||||||
endfunction
|
\"endfunction"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! Powerline(winnr, current)
|
function! Powerline(winnr, current)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user