coc-python
coc-python copied to clipboard
Errors in python virtualenv
Result from CocInfo
versions
vim version: NVIM v0.4.3 node version: v10.19.0 coc.nvim version: 0.0.78 coc.nivm directory: /home/anirudh/.config/nvim/plugged/coc.nvim term: alacritty platform: linux
Describe the bug
When I open a python file after activating a virtualenv, I get an error -
[coc.nvim] error: UnhandledRejection: TypeError: Cannot read property 'fileHash' of undefined
This does not seem to happen when I open a python file not in a virtualenv. I use direnv for activating my virtualenvs, but I have checked that the error appears even when I manually enable the virtualenv (using either pipenv or anaconda). However, I haven't seen it cause any issues in linting or completion. Another (maybe related) issue is that it asks me whether I want to use pyls or ms-pyls, even when i have set python.jediEnabled:false
in my coc-settings.json
. Again, this happens only in virtualenvs
Reproduce the bug
Minimal vimrc -
set nocompatible
call plug#begin('~/.config/nvim/plugged')
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
call plug#end()
filetype plugin indent on
syntax on
set hidden
- Create a python virtual env and install some packages
- Activate the virtual env
- Open a python file
- Error
[coc.nvim] error: UnhandledRejection: TypeError: Cannot read property 'fileHash' of undefined
pops up in messages after 2-3 seconds - Asks to use pyls or ms-pyls when you start inserting text
Forgot to mention, I didn't notice this issue in 0.0.77, which was (I think) the release branch till yesterday. I switched from master to release after seeing this issue, as I thought it was part of the breaking changes you have mentioned
Is there any update on this bug? I found similar bug, my coc-status show "anacoda3" : virutalenv
instead of "base" : conda
Have the same issue with virtualenv yeah. Never had this problem with a normal venv.