Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error after installation #574

Open
luisvgs opened this issue Mar 15, 2020 · 4 comments
Open

Python error after installation #574

luisvgs opened this issue Mar 15, 2020 · 4 comments

Comments

@luisvgs
Copy link

luisvgs commented Mar 15, 2020

Hi, I'm trying to install the plugin, but after setting up the clang_library_path, neovim outputs the following error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/home/luis/.vim/bundle/clang_complete/plugin/libclang.py", line 493, in run
    self.timer)
  File "/home/luis/.vim/bundle/clang_complete/plugin/libclang.py", line 212, in getCurrentTranslationUnit
    tu.reparse([currentFile])
  File "/home/luis/.vim/bundle/clang_complete/plugin/clang/cindex.py", line 2204, in reparse
    value = value.read()
AttributeError: 'unicode' object has no attribute 'read'

Am I missing any additional step after the installation? I would appreciate any guidance. Thanks in advance.

@luisvgs luisvgs changed the title Python error after install Python error after installation Mar 15, 2020
@ImanolGB
Copy link

ImanolGB commented May 23, 2020

Just in case it helps you my clumsy fix, my installation didn't like python2 neither, so I manually edited the clang_complete.vim file to force python3.

" if has('python')
"   let s:py_cmd = 'python'
"   let s:pyfile_cmd = 'pyfile'
" elseif has('python3')
let s:py_cmd = 'python3'
let s:pyfile_cmd = 'py3file'
" endif

From your error I guess your file to edit is in /home/luis/.vim/bundle/clang_complete/plugin/clang_complete.vim

@almucantar
Copy link

Have encountered the same. Any guess to fix?

@xaizek
Copy link
Collaborator

xaizek commented Sep 9, 2020

I would guess #581 should fix this.

@bdebyl
Copy link

bdebyl commented Sep 18, 2020

@xaizek it should fix it, same issue I had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants