Closed Toqozz closed 1 year ago
The neovim is already running? I think it is not running.
I thought the purpose of this code was to launch neovim as a child process and attach to that.
If I launch neovim (externally, just by running it) and then run the code I get the same error.
The backslash escape is needed in single quotes?
Seems like it...
File "C:\Users\Toqoz\Documents\code\neovim-test\something.py", line 4
nvim = attach('child', argv=['C:\Users\Toqoz\Documents\code\neovim-test\Neovim2\bin\nvim.exe', "--embed"])
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
I'm fairly sure it is finding nvim.exe
since if you change the path you get a file not found error.
Hm. You should enable log.
Reproduced it on neovim 0.7 Windows version. It works on older neovim(0.5) or Linux neovim. So I think something is changed.
Unfortunately, pynvim is not maintained well. neovim maintainers want to use Lua language instead.
Note: if_python3 works well.
Ah, thanks for that. I'll look into getting something else working.
neovim 0.4.4 was the latest version I was able to pynvim to work well with. For context, I'm on windows trying to use the ActualVim plugin on Sublime Text 4.
Any updates on this? Tried it using Neovim 0.9.0 but still doesnt work..
Since CI (github actions) is online now, Windows CI jobs are showing similar failures (python 3.10, 3.11) :
test/test_buffer.py::test_options ERROR [ 10%]
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x0000026941A645E0>
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\asyncio\base_subprocess.py", line 126, in __del__
self.close()
File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\asyncio\base_subprocess.py", line 104, in close
proto.pipe.close()
File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\asyncio\proactor_events.py", line 109, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\asyncio\base_events.py", line 761, in call_soon
self._check_closed()
File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\asyncio\base_events.py", line [51](https://github.com/neovim/pynvim/actions/runs/5559406058/jobs/10155486134#step:8:52)9, in _check_closed
Error: raise RuntimeError('Event loop is closed')
neovim/neovim@c86d5fa
(#11390) seems to be the culprit: stderr gets closed immediately and this causes the event loop to stop. See PR #543 for the fix.
I'm trying to run the example code on the main page of the README, namely:
But I get an error instead:
Running the same thing from a script gives a bit more info, but I think it's irrelevant:
Any pointers? I've also tried connecting using a socket but that also behaves weirdly on Windows.