Jedi-vim: ERROR: could not import the "jedi" Python module: ImportError: bad magic number in 'jedi.common': b'\x03\xf3\r\n'

Created on 16 Aug 2020  路  7Comments  路  Source: davidhalter/jedi-vim

Issue

Getting this error on startup.

Jedi-vim debug information

jedi-vim version
  • jedi-vim git version: 0.10.0-38-ga17b033-dirty
  • 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: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
  • global sys.version: 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18), [Clang 6.0 (clang-600.0.57)]
  • global site module: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site.py
    ERROR: could not import the "jedi" Python module: ImportError: bad magic number in 'jedi.common': b'\x03\xf3\r\n'
    Traceback (most recent call last):
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi_vim.py", line 114, in
    import jedi
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/__init__.py", line 32, in
    from jedi.api import Script, Interpreter, set_debug_function, \
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/api/__init__.py", line 24, in
    from jedi.api import classes
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/api/classes.py", line 24, in
    from jedi.inference.utils import unite
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/inference/__init__.py", line 70, in
    from jedi.inference import imports
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/inference/imports.py", line 24, in
    from jedi.inference import sys_path
    File "/Users/wviana/.vim/plugged/jedi-vim/pythonx/jedi/jedi/inference/sys_path.py", line 8, in
    from jedi.common import traverse_parents
Settings
  omnifunc=python3complete#Complete                                                                                                                                                 
        Last set from /usr/local/Cellar/neovim/0.4.3/share/nvim/runtime/ftplugin/python.vim line 41                                                                                 
  completeopt=menuone,longest,preview                                                                                                                                               
        Last set from ~/.vim/plugged/jedi-vim/plugin/jedi.vim line 36                                                                                                               

Press ENTER or type command to continue

Most helpful comment

@davidhalter actually a bronken vim-jedi instalation.
Removed and install jedi, got same error.
Commented, PlugClean, Uncoment, PlugInstall
Solved.

Thank you for the tip

All 7 comments

This is a broken jedi installation. Please remove it properly and reinstall it.

@davidhalter actually a bronken vim-jedi instalation.
Removed and install jedi, got same error.
Commented, PlugClean, Uncoment, PlugInstall
Solved.

Thank you for the tip

cd ~/.vim/bundle/jedi-vim
find -iname '*.pyc' -exec rm {} \;

happy fun.

I had the same issue.

cd ~/.vim/bundle/jedi-vim
find -iname '*.pyc' -exec rm {} ;

happy fun.

Thanks @linzhanyu

Thanks @linzhanyu
Although I had to add a \ to make it work in a bash shell:
find -iname '*.pyc' -exec rm {} \;

Otherwise I would get the error message: find: missing argument to -exec

cd ~/.vim/bundle/jedi-vim
find -iname '*.pyc' -exec rm {} ;

happy fun.

for some odd reason, when i type in the command i get this issue. please help !

find: illegal option -- i
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

@dontepalmer i had the same issue and tried this command and it worked

find . -type f -iname '*.pyc' -exec rm {} \;
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hungrybirder picture hungrybirder  路  11Comments

NoahTheDuke picture NoahTheDuke  路  10Comments

mwesthelle picture mwesthelle  路  14Comments

soulcmdc-zz picture soulcmdc-zz  路  3Comments

optix2000 picture optix2000  路  6Comments