You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the Pydocs do not work in Branch 6.4. The result of pressing Shift+K is:
Error detected while processing function pymode#doc#Show:
line 9:
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: bad argument type for built-in operation
However, using the python-mode / autoload / pymode / doc.vim from Branch 6.3 works correctly.
The following shows the differences between Branches 6.3 and 6.4...
Branch 6.3
fun! pymode#doc#Show(word) "{{{
if a:word == ''
echoerr "No name/symbol under cursor!"
else
py import StringIO
py sys.stdout, _ = StringIO.StringIO(), sys.stdout
py help(vim.eval('a:word'))
py sys.stdout, out = _, sys.stdout.getvalue()
redi @">
sil!py print out
redo END
call pymode#TempBuffer()
normal ""Pdd
wincmd p
endif
endfunction "}}}
Branch 6.4
fun! pymode#doc#Show(word) "{{{
if a:word == ''
echoerr "No name/symbol under cursor!"
else
py import StringIO
py sys.stdout, _ = StringIO.StringIO(), sys.stdout
py help(vim.eval('a:word'))
py sys.stdout, out = _, sys.stdout.getvalue()
call pymode#TempBuffer()
py vim.current.buffer.append(out.split('\n'), 0)
wincmd p
endif
endfunction "}}}
Using the python-mode / autoload / pymode / doc.vim from Branch 6.3 appears to work correctly in Branch 6.4, but I do not know if there are any negative effects from this. I am using MacVim 7.3/Pathogen and tested it with Python 2.7 and 2.6. I have also confirmed the same behavior with Vim 7.2 on Amazon Linux.
A fix (or guidance if I am doing something wrong) would be appreciated.
Note: Thank you for building and maintaining this awesome plugin!
very same problem here still on 6.7.
solved following your bug report, that is, changing doc.vim as it was in 6.3 version.
I know this isn't a proper fix, as I get:
Error detected while processing function pymode#doc#Show:
but at least, it disappear soon and opens the docs anyway.
Activity
alexrah commentedon Aug 27, 2012
very same problem here still on 6.7.
solved following your bug report, that is, changing doc.vim as it was in 6.3 version.
I know this isn't a proper fix, as I get:
Error detected while processing function pymode#doc#Show:but at least, it disappear soon and opens the docs anyway.
gag commentedon Dec 11, 2012
I solved this by changing
in doc.vim to
works perfectly fine now :)
gmrichmond commentedon Dec 12, 2012
Wonderful! Thanks so much!
On Tue, Dec 11, 2012 at 6:28 AM, Gleb notifications@github.com wrote:
Bugfix for issue python-mode#99
Bugfix for #99
Bugfix for python-mode#99