kalekseev/vim-coverage.py

E117: Unknown function: CoveragePyShow

Closed this issue · 5 comments

Good morning

While trying out the plugin I'm greeted with E117: Unknown function: CoveragePyShow

I'm unsure of where to go with this, or what information would be of use to try and diagnose, any assistance would be appreciated.

Hi, what editor and version do you use, have you setup plugin as described in README https://github.com/kalekseev/vim-coverage.py#install? If you are using neovim make sure the plugin is registered, execute :UpdateRemotePlugins the output should include remote/host: python3 host registered plugins ['vim_coveragepy']

Hi, thanks for the super quick response.

Editor: neovim 0.4.4
Setup: Yup, I followed the linked instructions.

When running :UpdateRemotePlugins I do see "remote/host: python3 host registered plugins ['vim_coveragepy']

Try to run :UpdateRemotePlugins, check the output then restart neovim and try :CoveragePy it should work.

Odd, running :UpdateRemotePlugins again and restarting, did indeed get me further.

With me now getting the below
error caught in async handler '/home/xxxx/.local/share/nvim/plugged/vim-coverage.py/rplugin/python3/vim_coveragepy:function:CoveragePyShow [['/home/xxx/systems/xxxx/python/xxxx/prog/xxx/.coverage', '/home/xxxx/systems/xxxx/python/xxxx/prog/xxxx/xxx.py']]'
Traceback (most recent call last):
File "/home/xxxx/.local/share/nvim/plugged/vim-coverage.py/rplugin/python3/vim_coveragepy/init.py", line 17, in show
self.plugin.show(*args)
File "/home/xxxx/.local/share/nvim/plugged/vim-coverage.py/rplugin/python3/vim_coveragepy/util.py", line 188, in show
statements, missing, missing_branches = self._get_file_coverage(
File "/home/xxxxx/.local/share/nvim/plugged/vim-coverage.py/rplugin/python3/vim_coveragepy/util.py", line 181, in _get_file_coverage
cov, _ = self._get_coverage(cov_file)
File "/home/xxxx/.local/share/nvim/plugged/vim-coverage.py/rplugin/python3/vim_coveragepy/util.py", line 175, in _get_coverage
cov_data.read()
AttributeError: 'CoverageData' object has no attribute 'read'

Due to some other issues, I'm using coverage 4.2, pytest 4.6 and pytest-cov 2.4
I am generating the coverage report with.
pytest-3.8 -x -v --cov=./ (I'm in the top level directory of the program I'm testing).

Sorry but only coverage 5.0+ is supported, I updated README to reflect that.