deoplete-plugins / deoplete-go

Asynchronous Go completion for Neovim. deoplete source for Go.
MIT License
424 stars 28 forks source link

ValueError: Expected object or value #138

Closed pinpox closed 6 years ago

pinpox commented 6 years ago

Hi,

I get an error on Linux arch with neovim. Everything up-to-date. Editing this file e.g: https://ptpb.pw/wIUm Just start typing anything, the this message appears

[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
gocode decode error.  Use :messages / see above for error details.                 
[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
.  Use :messages / see above for error details.                                    
[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
2018/10/16 09:54:18 rpc: can't find service Server.AutoComplete                    
.  Use :messages / see above for error details.                                    
[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
gocode decode error.  Use :messages / see above for error details.                 
[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
.  Use :messages / see above for error details.                                    
[deoplete] Traceback (most recent call last):                                      
  File "/home/binaryplease/.vim/plugged/deoplete-go/rplugin/python3/deoplete/source
s/deoplete_go.py", line 242, in get_complete_result                                
    result = loads(stdout_data.decode())                                           
ValueError: Expected object or value                                               
2018/10/16 09:54:22 rpc: can't find service Server.AutoComplete                    
.  Use :messages / see above for error details.     
Shougo commented 6 years ago

I have tested it and it works. Please upload more detailed information to referenced the problem. Please read other issues. If not, I will close the issue.

Shougo commented 6 years ago

https://github.com/mdempsky/gocode is already installed?

pinpox commented 6 years ago

@Shougo yes gocode is installed and up-to-date. I can run it correctly on the terminal. What other info do you need? The problem occurs without doing much, just open any go file and type someting.

Shougo commented 6 years ago

Please provide the minimal init.vim. And the reproduce instructions.

gocode version information and go version information are needed.

Please test it with other machine. The problem must be reproduce-able in other machines.

If not, I close the issue..,

Shougo commented 6 years ago

Hm. gocode server seems doesn't work. Please read the error messages.

I think gocode close is needed. Please read other issues.

adrianduke commented 6 years ago

I'm experiencing the same issue as OP with go 1.11.1 darwin/amd64, neovim v0.3.1, deoplete-go 5b2c709and gocode 22f3bf7.

Is there any temporary fix available? Possibly a rollback?

adrianduke commented 6 years ago

Ok for anyone having the same issue, update everything (deoplete, deoplete-go, go and gocode) and make sure to kill the existing gocode process if there is one running $ ps aux | grep gocode. That seemed to resolve it for me

812lcl commented 6 years ago

Ok for anyone having the same issue, update everything (deoplete, deoplete-go, go and gocode) and make sure to kill the existing gocode process if there is one running $ ps aux | grep gocode. That seemed to resolve it for me

Yes, it also works for me, thanks @adrianduke