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

Problem launching server on Neovim #28

Closed
edleeman17 opened this issue Jun 5, 2020 · 10 comments
Closed

Problem launching server on Neovim #28

edleeman17 opened this issue Jun 5, 2020 · 10 comments
Assignees
Labels
bug Something isn't working properly

Comments

@edleeman17
Copy link

edleeman17 commented Jun 5, 2020

Error detected while processing function PathfinderLoop[6]..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>                                                                                                                                                                      
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/commands.py", line 72, in autorun                                                                                                                   
    run()                                                                                                                                                                                                   
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/commands.py", line 49, in run                                                                                                                       
    client.pathfind(start_state.view, current_state.view, show_output)                                                                                                                                      
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/client.py", line 125, in pathfind                                                                                                                   
    self.server_connection.send(                                                                                                                                                                            
AttributeError: 'NoneType' object has no attribute 'send'`

I have the latest python3 and did a pip3 install for timers and popupwin

@danth danth added the bug Something isn't working properly label Jun 5, 2020
@danth danth self-assigned this Jun 5, 2020
@danth
Copy link
Owner

danth commented Jun 5, 2020

The child process used for doing the pathfinding has not launched, or not connected yet, hence server_connection is None instead of a connection object.

How soon did this occur after starting Vim? Perhaps it just hadn't started up fast enough to be ready to receive requests. Adding a check for that situation and displaying a better error message (or waiting for the server to load) would be a good idea, I'll do that soon.

@edleeman17
Copy link
Author

Thank you! here's an example of what is happening for me.

Peek 2020-06-05 13-24

@danth
Copy link
Owner

danth commented Jun 5, 2020

I just pushed some changes, could you update to at least d58490b and let me know what happens then?

@edleeman17
Copy link
Author

edleeman17 commented Jun 5, 2020

Okay, new error this time

line   18:                                                                                                                                                                                                         
Error invoking 'python_execute' on channel 3 (python3-script-host):                                                                                                                                                
Traceback (most recent call last):                                                                                                                                                                                 
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/client.py", line 80, in poll_responses                                                                                                                     
    self.server_connection = connection.Client(self.file_path)                                                                                                                                                     
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 502, in Client                                                                                                                                     
    c = SocketClient(address)                                                                                                                                                                                      
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 630, in SocketClient                                                                                                                               
    s.connect(address)                                                                                                                                                                                             
FileNotFoundError: [Errno 2] No such file or directory                                                                                                                                                             
                                                                                                                                                                                                                   
During handling of the above exception, another exception occurred:                                                                                                                                                
                                                                                                                                                                                                                   
Traceback (most recent call last):                                                                                                                                                                                 
  File "<string>", line 1, in <module>                                                                                                                                                                             
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/client.py", line 86, in poll_responses                                                                                                                     
    raise Exception(                                                                                                                                                                                               
Exception: Pathfinding server process exited with return code {return_code}```                                                                                             

danth added a commit that referenced this issue Jun 5, 2020
#28 suggests that some people may have been trying to install these as Python libraries.
@danth
Copy link
Owner

danth commented Jun 5, 2020

Are you using Neovim? If you are I think I know the problem. --not-a-term isn't an option for Neovim, instead we should be using --headless.

@edleeman17
Copy link
Author

I am using neovim... :D

@danth
Copy link
Owner

danth commented Jun 5, 2020

Yeah, that's probably it then, I'll push a hopeful fix in a minute

@danth
Copy link
Owner

danth commented Jun 5, 2020

Ok can you try it with d72b386? I can't test since I only have regular Vim/GVim installed

@edleeman17
Copy link
Author

Error detected while processing function PathfinderLoop[2]..provider#python3#Call:                     
line   18:                                                                                             
Error invoking 'python_execute' on channel 3 (python3-script-host):                                    
Traceback (most recent call last):                                                                     
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/client.py", line 99, in poll_responses         
    self.server_connection = connection.Client(self.file_path)                                         
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 502, in Client                         
    c = SocketClient(address)                                                                          
  File "/usr/lib/python3.8/multiprocessing/connection.py", line 630, in SocketClient                   
    s.connect(address)                                                                                 
FileNotFoundError: [Errno 2] No such file or directory                                                 
                                                                                                       
During handling of the above exception, another exception occurred:                                    
                                                                                                       
Traceback (most recent call last):                                                                     
  File "<string>", line 1, in <module>                                                                 
  File "/home/ed/.vim/plugged/pathfinder.vim/pathfinder/client.py", line 105, in poll_responses        
    raise Exception(                                                                                   
Exception: Pathfinding server process exited with return code 1

No luck, I'm afraid, thank you for your effort though!

@danth
Copy link
Owner

danth commented Jun 5, 2020

I think we need to add something to fetch and log stdout/stderr from the child process so that we can see what has gone wrong.

@danth danth changed the title Exception happening when using Problem launching server on Neovim Jun 5, 2020
@danth danth closed this as completed in 40a435b Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

2 participants