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

NameError: name 'Vira' is not defined #43

Closed
uberbrodt opened this issue Aug 19, 2020 · 15 comments
Closed

NameError: name 'Vira' is not defined #43

uberbrodt opened this issue Aug 19, 2020 · 15 comments

Comments

@uberbrodt
Copy link

Followed README, but getting this when running :ViraServers:

Error detected while processing function vira#_menu[42]..provider#python3#Call:                                                                                                                                                                                                                                                                             
line   18:                                                                                                                                                                                                                                                                                                                                                  
Error invoking 'python_execute' on channel 4 (python3-script-host):                                                                                                                                                                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                          
  File "<string>", line 1, in <module>                                                                                                                                                                                                                                                                                                                      
NameError: name 'Vira' is not defined        

output of :version

:version                                                                                                                                                                                                                                                                                                                                                    NVIM v0.4.4                                                                                                                                                                                                                                                                                                                                                 Build type: RelWithDebInfo                                                                                                                                                                                                                                                                                                                                  
LuaJIT 2.1.0-beta3                                                                                                                                                                                                                                                                                                                                          
Compilation: /usr/bin/cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fc
f-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE
 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/builddir/build/BUILD/neovim-0.4.4/build/config -I/builddir/build/BUILD/neovim-0.4.4/src -I/usr/include -I/usr/include/lua-5.1 -I/builddir/build/BUILD/neovim-0.4.4/build/src/nvim/auto -I/builddir/build/BUILD/neovim-0.4.4/build/include                                                          
Compiled by mockbuild                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                            
Features: +acl +iconv +tui                                                                                                                                                                                                                                                                                                                                  
See ":help feature-compile"                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                            
   system vimrc file: "$VIM/sysinit.vim"                                                                                                                                                                                                                                                                                                                    
  fall-back for $VIM: "/usr/share/nvim"                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                            
Run :checkhealth for more info                                                                                                                                                                                                                                                                                                                              
Press ENTER or type command to continue              

python3 output from healthcheck

## Python 3 provider (optional)
  - INFO: pyenv: Path: /home/cbrodt/lib/pyenv/libexec/pyenv
  - INFO: pyenv: Root: /home/cbrodt/lib/pyenv
  - INFO: Using: g:python3_host_prog = "/home/cbrodt/lib/pyenv/versions/python_neovim3/bin/python"
  - INFO: Executable: /home/cbrodt/lib/pyenv/versions/python_neovim3/bin/python
  - INFO: Python version: 3.8.3
  - INFO: pynvim version: 0.4.1
  - OK: Latest pynvim is installed.

@n0v1c3
Copy link
Owner

n0v1c3 commented Aug 19, 2020

@uberbrodt Thank you for letting us know along with the information.

I will have a real look at the issue, I just happen to be getting ready to be going home so I will be on it when I actually get a chance.

@ijsong
Copy link

ijsong commented Aug 20, 2020

@uberbrodt If you are using nvim, check pynvim.
https://github.com/neovim/pynvim

@n0v1c3
Copy link
Owner

n0v1c3 commented Aug 20, 2020

@uberbrodt
pip install --user pynvim
OR
pip3 install --user pynvim (this was required in another issue over pip claimed due to nvim)

I have not had a real chance to test your issue but @ijsong reminded me of another issue we had.

@n0v1c3
Copy link
Owner

n0v1c3 commented Aug 24, 2020

@uberbrodt I am assuming pynvim was not the true core of the issue. I am curious if it is only neovim or if vim is also capable of producing the same issue. The closest I was able to get is having a missing characters in my vira_servers file. Are you using the json or the yaml file?

@uberbrodt
Copy link
Author

uberbrodt commented Aug 24, 2020 via email

@n0v1c3
Copy link
Owner

n0v1c3 commented Aug 25, 2020

No worries. I am simply interested in making it as easy as possible for everyone to set up. I currently only have an open issue with nVim mentioned and that is simply an update to the README to show that it is supported. 😓 I will now need to add the link to this github issue to that issue as a requirement to call it complete.

@uberbrodt
Copy link
Author

I tried upgrading pynvim, but looks like 0.4.1 is the latest version. I double checked the servers config and it looks like valid JSON to me and to a JSON linter I installed. I haven't tried VIM, though I suppose I could. What platforms do you test against?

@n0v1c3
Copy link
Owner

n0v1c3 commented Aug 25, 2020

Currently most of my testing is in the Linux world (Arch Linux), we did have some OSx issues not too long ago but it was for the BROWSER and there was a pull request that fixed that one. I am doing the testing on Vim and NVim but do admit that I am in Vim the most. Windows may be falling behind in the testing but it was working in the past...

I did see a small change in version of nVim (community/neovim) for my initial tests (0.4.4-1) on this and I have also pushed it up to v0.5.0 (aur/neovim-git). Vim I am using 8.1. Our Python 3 looks the same other than paths. I do wonder if the path for python affects us as my executable is /usr/bin/python3.

Otherwise, LuaJIT I am using only 2.0.5 but I do not believe that should affect us at all.

@uberbrodt
Copy link
Author

I'm running Fedora, so definitely seems like this should work...I do set the g:python3_host_prog variable so that I can use a particular Pyenv, so that might be the issue? I'll try unsetting it and see if that helps

@n0v1c3
Copy link
Owner

n0v1c3 commented Sep 7, 2020

@uberbrodt looking if you have had a try I will need to set up a test for that myself.

The only thing I have come across so far, this was in the help files:

Must be set before any check for has("python3")

I did not see this in my local help but on the online one. I also assume this "should" not be the issue.

@zamboney
Copy link

i had the same problem and it's turn out that i didn't configure the ~/.config/vira/vira_servers.json.
@uberbrodt try to check if your vira_servers.json file is set

@n0v1c3
Copy link
Owner

n0v1c3 commented Sep 16, 2020

We have an issue for that one, if vira_servers.json/yaml doesn't exist then ask for manual entry. I will move it up into the next release. I do believe @uberbrodt has a server file set up but still worth having the manual entry or at least a clean message to config your server.

@zamboney thanks for the further update.

@n0v1c3
Copy link
Owner

n0v1c3 commented Sep 16, 2020

@uberbrodt I am curious if you are using pass as we do also have one bug that shows up when multiple lines are in your pass. If you do try a direct password entry as this is also on the next release plan.

@uberbrodt
Copy link
Author

Ok, so I finally got back around to looking at this. I tested with removing the python3_host_prog and it worked after I upgraded to pynvim 0.4.2 (previous was at 0.4.1).

Setting the python3_host_prog again and then manually install the jira package works as well. My suspicion is that the automatic install via vim-plug was not working with virtualenv for some reason, so might be something to note in the README. Thanks to everyone for debugging and offering advice!

@n0v1c3
Copy link
Owner

n0v1c3 commented Sep 18, 2020

I will keep this open as I create a new issue for virtualenv testing along with updating the README.

Thanks for the testing, feedback and most of the work. I see another issue up already but please keep them coming as this is the way to make it work better for more of us.

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

4 participants