You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Python virtualenv- INFO: $VIRTUAL_ENV is set to: /home/r3r/.cache/pypoetry/virtualenvs/pyrepl-p7QPvHdF-py3.9
- INFO: Python version: 3.9.7
- OK: $VIRTUAL_ENV provides :!python.
Actual behaviour
## Python virtualenv- WARNING: $VIRTUAL_ENV is set to: /home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9
And its /bin directory contains: python, python3, python3.9, pythoni, pythoni1
But $PATH yields this pythoni executable: Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 482, in prepare
self.console.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 357, in prepare
self.__svtermstate = tcgetattr(self.input_fd)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/fancy_termios.py", line 34, in tcgetattr
return TermState(termios.tcgetattr(fd))
termios.error: (25, 'Inappropriate ioctl for device')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/bin/pythoni", line 36, in <module>
main(use_pygame_console=('pg' in sys.argv))
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/python_reader.py", line 403, in main
getattr(rc, interactmethod)()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/python_reader.py", line 207, in interact
l = unicode(self.reader.readline(), 'utf-8')
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 599, in readline
self.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/historical_reader.py", line 240, in prepare
super(HistoricalReader, self).prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 492, in prepare
self.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 502, in restore
self.console.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 389, in restore
self.__maybe_write_code(self._rmkx)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 305, in __maybe_write_code
self.__write_code(fmt, *args)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 301, in __write_code
self.__buffer.append((curses.tparm(fmt, *args), 1))
AttributeError: 'UnixConsole' object has no attribute '_UnixConsole__buffer'
And $PATH in subshells yields this pythoni executable: Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 482, in prepare
self.console.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 357, in prepare
self.__svtermstate = tcgetattr(self.input_fd)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/fancy_termios.py", line 34, in tcgetattr
return TermState(termios.tcgetattr(fd))
termios.error: (25, 'Inappropriate ioctl for device')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/bin/pythoni", line 36, in <module>
main(use_pygame_console=('pg' in sys.argv))
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/python_reader.py", line 403, in main
getattr(rc, interactmethod)()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/python_reader.py", line 207, in interact
l = unicode(self.reader.readline(), 'utf-8')
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 599, in readline
self.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/historical_reader.py", line 240, in prepare
super(HistoricalReader, self).prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 492, in prepare
self.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 502, in restore
self.console.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 389, in restore
self.__maybe_write_code(self._rmkx)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 305, in __maybe_write_code
self.__write_code(fmt, *args)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 301, in __write_code
self.__buffer.append((curses.tparm(fmt, *args), 1))
AttributeError: 'UnixConsole' object has no attribute '_UnixConsole__buffer'
And $PATH yields this pythoni1 executable: Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0]
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 482, in prepare
self.console.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 357, in prepare
self.__svtermstate = tcgetattr(self.input_fd)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/fancy_termios.py", line 34, in tcgetattr
return TermState(termios.tcgetattr(fd))
termios.error: (25, 'Inappropriate ioctl for device')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/bin/pythoni1", line 19, in <module>
run_multiline_interactive_console()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/simple_interact.py", line 64, in run_multiline_interactive_console
statement = multiline_input(more_lines, ps1, ps2,
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/readline.py", line 248, in multiline_input
return reader.readline(returns_unicode=returns_unicode)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 599, in readline
self.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/historical_reader.py", line 240, in prepare
super(HistoricalReader, self).prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 492, in prepare
self.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 502, in restore
self.console.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 389, in restore
self.__maybe_write_code(self._rmkx)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 305, in __maybe_write_code
self.__write_code(fmt, *args)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 301, in __write_code
self.__buffer.append((curses.tparm(fmt, *args), 1))
AttributeError: 'UnixConsole' object has no attribute '_UnixConsole__buffer'
And $PATH in subshells yields this pythoni1 executable: Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0]
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 482, in prepare
self.console.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 357, in prepare
self.__svtermstate = tcgetattr(self.input_fd)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/fancy_termios.py", line 34, in tcgetattr
return TermState(termios.tcgetattr(fd))
termios.error: (25, 'Inappropriate ioctl for device')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/bin/pythoni1", line 19, in <module>
run_multiline_interactive_console()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/simple_interact.py", line 64, in run_multiline_interactive_console
statement = multiline_input(more_lines, ps1, ps2,
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/readline.py", line 248, in multiline_input
return reader.readline(returns_unicode=returns_unicode)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 599, in readline
self.prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/historical_reader.py", line 240, in prepare
super(HistoricalReader, self).prepare()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 492, in prepare
self.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/reader.py", line 502, in restore
self.console.restore()
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 389, in restore
self.__maybe_write_code(self._rmkx)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 305, in __maybe_write_code
self.__write_code(fmt, *args)
File "/home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9/lib/python3.9/site-packages/pyrepl/unix_console.py", line 301, in __write_code
self.__buffer.append((curses.tparm(fmt, *args), 1))
AttributeError: 'UnixConsole' object has no attribute '_UnixConsole__buffer'
So invoking Python may lead to unexpected results.
- ADVICE:
- $PATH ambiguities arise if the virtualenv is not properly activated prior to launching Nvim. Close Nvim, activate the virtualenv, check that invoking Python from the command line launches the correct one, then relaunch Nvim.
- $PATH ambiguities in subshells typically are caused by your shell config overriding the $PATH previously set by the virtualenv. Either prevent them from doing so, or use this workaround: https://vi.stackexchange.com/a/7654
Comment
this could probably nvim issue, but i don't know how to repoduce it without nvim checkhealth
there is also neovim/neovim#13965 which may not detect pythoni and pythoni1 in future version of nvim
Subject of the issue
when running nvim checkhealth, pythoni and pythoni1 raise AttributeError
Your environment
Steps to reproduce
pyproject.toml
pyproject.toml
poetry install
poetry run nvim -c checkhealth
Expected behaviour
there is no error on
python virtualenv
sectionActual behaviour
Comment
this could probably nvim issue, but i don't know how to repoduce it without nvim checkhealth
there is also neovim/neovim#13965 which may not detect pythoni and pythoni1 in future version of nvim
related issue pdbpp/pdbpp#476
The text was updated successfully, but these errors were encountered: