davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.27k stars 370 forks source link

No autoconplete for basic python statements #1031

Closed zakutin closed 3 years ago

zakutin commented 3 years ago

Issue

In Windows, the autocomplete is failing to appear for some basic python statements, like import, def, with, for, etc. It yields a message -- Omni completion (^O^N^P) Pattern not found on Ctrl+Space press. It doesn't work for both, gvim and vim in Windows terminal.

On Ubuntu 20.04 everything works well.

Steps to reproduce

  1. Enter imp, de, wi, etc.
  2. Press Ctrl+Space
  3. Pattern not found

    Jedi-vim debug information

    jedi-vim version
    • jedi-vim git version: a17b033
    • jedi git submodule status: 3b7106ae71cb7bd3431101d169a0110ee0c179aa pythonx/jedi (v0.17.2)
    • parso git submodule status: c864ca60d1a2f36524a4f79013a7de223e65e19d pythonx/parso (v0.6.0)
    Global Python

    Using Python version 3 to access Jedi.

    • global sys.executable: C:\ProgramData\tools\vim\vim82\vim.exe
    • global sys.version: 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)]
    • global site module: C:\Users\EA\AppData\Local\Programs\Python\Python38\Lib\site.py
    Jedi
    • path: C:\Users\EA\vimfiles\plugged\jedi-vim\pythonx\jedi\jedi\__init__.py
    • version: 0.17.2
    Jedi environment: <Environment: 3.8.6 in C:\Users\EA\AppData\Local\Programs\Python\Python38>
    • executable: C:\Users\EA\AppData\Local\Programs\Python\Python38\python.exe
    • sys_path:
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\python38.zip
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\DLLs
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\lib
      • C:\Users\EA\AppData\Local\Programs\Python\Python38
      • C:\Users\EA\AppData\Roaming\Python\Python38\site-packages
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\lib\site-packages
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\lib\site-packages\win32
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\lib\site-packages\win32\lib
      • C:\Users\EA\AppData\Local\Programs\Python\Python38\lib\site-packages\Pythonwin
    Known environments
    • <Environment: 3.8.6 in C:\Users\EA\AppData\Local\Programs\Python\Python38> (C:\Users\EA\AppData\Local\Programs\Python\Python38\python.exe)
    Settings
      omnifunc=jedi#completions
      Last set from ~\vimfiles\plugged\jedi-vim\autoload\jedi.vim line 738
      completeopt=menuone,longest,preview
      Last set from ~\vimfiles\plugged\jedi-vim\plugin\jedi.vim line 36

    :version

    
    VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 15 2020 22:02:59)
    MS-Windows 64-bit console version
    Included patches: 1-1852
    Compiled by appveyor@APPVYR-WIN
    Huge version without GUI.  Features included (+) or not (-):
    +acl                +cscope             +iconv/dyn          +multi_lang         +smartindent        +user_commands
    +arabic             +cursorbind         +insert_expand      +mzscheme/dyn       +sound              +vartabs
    +autocmd            +cursorshape        +ipv6               -netbeans_intg      +spell              +vertsplit
    +autochdir          +dialog_con         +job                +num64              +startuptime        +virtualedit
    +autoservername     +diff               +jumplist           +packages           +statusline         +visual
    -balloon_eval       +digraphs           +keymap             +path_extra         -sun_workshop       +visualextra
    +balloon_eval_term  -dnd                +lambda             +perl/dyn           +syntax             +viminfo
    -browse             -ebcdic             +langmap            +persistent_undo    +tag_binary         +vreplace
    ++builtin_terms     +emacs_tags         +libcall            +popupwin           -tag_old_static     +vtp
    +byte_offset        +eval               +linebreak          -postscript         -tag_any_white      +wildignore
    +channel            +ex_extra           +lispindent         +printer            +tcl/dyn            +wildmenu
    +cindent            +extra_search       +listcmds           +profile            +termguicolors      +windows
    +clientserver       -farsi              +localmap           +python/dyn         +terminal           +writebackup
    +clipboard          +file_in_path       +lua/dyn            +python3/dyn        -termresponse       -xfontset
    +cmdline_compl      +find_in_path       +menu               +quickfix           +textobjects        -xim
    +cmdline_hist       +float              +mksession          +reltime            +textprop           -xpm_w32
    +cmdline_info       +folding            +modify_fname       +rightleft          -tgetent            -xterm_save
    +comments           -footer             +mouse              +ruby/dyn           +timers             
    +conceal            +gettext/dyn        -mouseshape         +scrollbind         +title              
    +cryptv             -hangul_input       +multi_byte_ime/dyn +signs              -toolbar            
       system vimrc file: "$VIM\vimrc"
         user vimrc file: "$HOME\_vimrc"
     2nd user vimrc file: "$HOME\vimfiles\vimrc"
     3rd user vimrc file: "$VIM\_vimrc"
          user exrc file: "$HOME\_exrc"
      2nd user exrc file: "$VIM\_exrc"
           defaults file: "$VIMRUNTIME\defaults.vim"
    Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND  -DFEAT_JOB_CHANNEL -DFEAT_IPV6      -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python38.dll\" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DRUBY_VERSION=24 -DFEAT_HUGE /Fd.\ObjCULYHTRZAMD64/ /Zi
    Linking: link  /nologo /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64   libcmt.lib  user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python38.lib   "C:\Tcl\lib\tclstub86.lib" winmm.lib WSock32.lib Ws2_32.lib /PDB:vim.pdb -debug

    :messages

    Messages maintainer: Bram Moolenaar <Bram@vim.org>
    Traceback (most recent call last):
      File "C:\Users\EA\vimfiles\plugged\jedi-vim\pythonx\jedi_vim.py", line 194, in wrapper
        return func(*args, **kwargs)
      File "C:\Users\EA\vimfiles\plugged\jedi-vim\pythonx\jedi_vim.py", line 337, in completions
        vim.command('return ' + strout)
    UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 1643: ordinal not in range(256)
    
    :scriptnames ``` 1: C:\ProgramData\tools\vim\_vimrc 2: C:\ProgramData\tools\vim\vim82\vimrc_example.vim 3: C:\ProgramData\tools\vim\vim82\defaults.vim 4: C:\ProgramData\tools\vim\vim82\filetype.vim 5: C:\ProgramData\tools\vim\vim82\ftplugin.vim 6: C:\ProgramData\tools\vim\vim82\indent.vim 7: C:\ProgramData\tools\vim\vim82\syntax\syntax.vim 8: C:\ProgramData\tools\vim\vim82\syntax\synload.vim 9: C:\ProgramData\tools\vim\vim82\syntax\syncolor.vim 10: ~\vimfiles\autoload\plug.vim 11: C:\ProgramData\tools\vim\vim82\ftoff.vim 12: ~\vimfiles\plugged\jedi-vim\plugin\jedi.vim 13: C:\ProgramData\tools\vim\vim82\plugin\getscriptPlugin.vim 14: C:\ProgramData\tools\vim\vim82\plugin\gzip.vim 15: C:\ProgramData\tools\vim\vim82\plugin\logiPat.vim 16: C:\ProgramData\tools\vim\vim82\plugin\manpager.vim 17: C:\ProgramData\tools\vim\vim82\plugin\matchparen.vim 18: C:\ProgramData\tools\vim\vim82\plugin\netrwPlugin.vim 19: C:\ProgramData\tools\vim\vim82\plugin\rrhelper.vim 20: C:\ProgramData\tools\vim\vim82\plugin\spellfile.vim 21: C:\ProgramData\tools\vim\vim82\plugin\tarPlugin.vim 22: C:\ProgramData\tools\vim\vim82\plugin\tohtml.vim 23: C:\ProgramData\tools\vim\vim82\plugin\vimballPlugin.vim 24: C:\ProgramData\tools\vim\vim82\plugin\zipPlugin.vim 25: C:\ProgramData\tools\vim\vim82\pack\dist\opt\matchit\plugin\matchit.vim 26: ~\vimfiles\plugged\jedi-vim\ftplugin\python\jedi.vim 27: ~\vimfiles\plugged\jedi-vim\autoload\jedi.vim 28: C:\ProgramData\tools\vim\vim82\ftplugin\python.vim 29: ~\vimfiles\plugged\jedi-vim\after\ftplugin\python\jedi.vim 30: C:\ProgramData\tools\vim\vim82\indent\python.vim 31: C:\ProgramData\tools\vim\vim82\syntax\python.vim 32: ~\vimfiles\plugged\jedi-vim\after\syntax\python.vim ```
zakutin commented 3 years ago

There was an error 404 on posting the issue #1030.