fannheyward/coc-pyright

Cannot perform addImport using selected element(s)

fannheyward opened this issue · 2 comments

Hi, I'm receiving errors using this functionality in vim 9.0.

Pyright version:

[coc.nvim] coc- pyright 1.1.325 with Pyright 1.1.327

On the cursor position, I use the <Plug>(coc-codeaction-cursor) command, and receive the expected options:

image

However, if I select 1, I get the following error:

[coc.nvim] Cannot perform addImport using selected element(s).

Could you tell me why its not adding in the import when it correctly identifies the missing module?

Originally posted by @SuryaThiru in #419 (comment)

@SuryaThiru what's the output of :CocCommand workspace.showOutput Pyright, some error logs will go here.

Thank you for sharing that command, seems there issue was an unrelated syntax error above the code. I was looking for errors in the CocOpenLog and couldn't find any info. Missed the command above in the docs.