Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when loading source jedi: Failed to start server; No module named jedi #108

Closed
duikboot opened this issue Feb 17, 2017 · 2 comments
Closed

Comments

@duikboot
Copy link

Problem summary

If I try to use deoplete-jedi in a python project with or without a virtualenv activated I get the following error:

[deoplete] Error when loading source jedi: Failed to start server (/home/arjen/Projects/snippets/.venv/bin/python -u /home/arjen/.config/nvim/bundle/jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py --desc-length 0 --debug --
debug-level 10): Server exited with b'Traceback (most recent call last):\n File "/home/arjen/.config/nvim/bundle/jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 565, in \n s = Server(args.desc_length, args
.short_types, args.docstrings)\n File "/home/arjen/.config/nvim/bundle/jedi/rplugin/python3/deoplete/sources/deoplete_jedi/server.py", line 149, in init\n from jedi import settings\nImportError: No module named jedi\n': error: 1.
Ignoring.

If I install deoplete-jedi in the projects virtualenv it works as expected

Expected

It works without installing it to the projects virtualenv

Environment Information

  • OS: Fedora 25
  • Neovim version:
    NVIM v0.2.0-598-g0e44916
    Build type: RelWithDebInfo
    Compilation: /usr/lib64/ccache/cc -Wconversion -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/home/arjen/Programms/neovim/build/config -I/home/arjen/Programms/neovim/src -I/home/arjen/Programms/neovim/.deps/usr/include -I/home/arjen/Programms/neovim/.deps/usr/include -I/home/arjen/Programms/neovim/.deps/usr/include -I/home/arjen/Programms/neovim/.deps/usr/include -I/home/arjen/Programms/neovim/.deps/usr/include -I/home/arjen/Programms/neovim/.deps/usr/include -I/usr/include -I/home/arjen/Programms/neovim/build/src/nvim/auto -I/home/arjen/Programms/neovim/build/include
    Compiled by arjen@devmob.laptop

Provide a minimal init.vim with less than 50 lines (required)

" Pathogen - Allows us to organize our vim plugins
" Load pathogen with docs for all plugins
filetype off
" call pathogen#incubate()
call pathogen#infect('bundle/{}')
call pathogen#helptags()
" pathogen#incubate() to pathogen#infect('bundle/{}')

" Basic Settings {{{
syntax on                     " syntax highlighting
filetype on                   " try to detect filetypes

" So neovim will work in a VirtualEnv
let g:python_host_prog='/home/arjen/config/dotfiles/_neovim/ENV2/bin/python'
let g:python3_host_prog='/home/arjen/config/dotfiles/_neovim/ENV/bin/python'

set runtimepath+=~/config/dotfiles/_neovim/bundle/deoplete/
set runtimepath+=~/config/dotfiles/_neovim/bundle/deoplete-jedi/

call deoplete#custom#set('jedi', 'debug_enabled', 1)
call deoplete#enable_logging('DEBUG', '/tmp/deoplete.log')

let g:deoplete#enable_at_startup = 1

Generate logfiles if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/nvim-log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc

Then look at and attach the files /tmp/nvim-log_{PID} and
/tmp/deoplete.log here.

Steps to reproduce the issue after starting Neovim (required)

  1. Start neovim
  2. open python file
  3. go into insert mode

checkhealth.txt

deoplete.txt
nvim-log_py2_script.txt

nvim-log_py3_rplugin.txt

@tweekmonster
Copy link
Collaborator

Did you clone this repo yourself? If so you'll need to run this:

git submodule update --init

@duikboot
Copy link
Author

Thanks a lot, it works. Could you please document it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants