company-jedi
company-jedi copied to clipboard
Completion attempt gets wrong-type-argument (epc:manager nil)
GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
Using miniconda3 virtual environments
Company and company-jedi installed from Melpa:
company 20201014.2251 installed
company-jedi 20200324.25 installed
pyvenv 20191202.1039 installed
Prereqs installed:
$ conda list | grep 'epc\|jedi'
epc 0.0.5 pypi_0 pypi
jedi 0.17.2 pypi_0 pypi
Config:
;; company
(eval-after-load "company"
'(add-to-list 'company-backends 'company-jedi))
(add-hook 'after-init-hook 'global-company-mode)
(setq jedi:server-command '("~/.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py"))
jediepcserver.py works at that path:
$ ~/.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py --help
usage: jediepcserver.py [-h] [--address ADDRESS] [--port PORT]
[--port-file PORT_FILE] [--sys-path SYS_PATH]
[--sys-path-append SYS_PATH_APPEND]
[--virtual-env VIRTUAL_ENV] [--log LOG]
[--log-level {CRITICAL,ERROR,WARN,INFO,DEBUG}]
[--log-rotate-max-size LOG_ROTATE_MAX_SIZE]
[--log-rotate-max-count LOG_ROTATE_MAX_COUNT]
[--log-traceback] [--pdb] [--ipdb]
Jedi EPC server.
Completion fails with:
*** jedi-mode is disabled in #<buffer hello.py> ***
Fix the problem and re-enable it.
*** You may need to run "M-x jedi:install-server". ***
This could solve the problem especially if you haven't run the command yet
since Jedi.el installation or update and if the server complains about
Python module imports.
I enabled debug on error and get this traceback:
Debugger entered--Lisp error: (wrong-type-argument epc:manager nil)
signal(wrong-type-argument (epc:manager nil))
jedi:epc--start-epc("~/.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py" nil)
jedi:server-pool--start(("~/.emacs.d/elpa/jedi-core-20191011.1750/jediepcserver.py"))
jedi:start-server()
jedi:get-epc()
jedi:call-deferred(complete)
company-jedi-candidates(#f(compiled-function (candidates) #<bytecode 0x2a33485>))
company--fetch-candidates(#("impo" 0 4 (fontified t)))
company-calculate-candidates(#("impo" 0 4 (fontified t)) nil)
company--begin-new()
company--perform()
company-auto-begin()
company-idle-begin(#<buffer hello.py> #<window 3 on hello.py> 75 5)
apply(company-idle-begin (#<buffer hello.py> #<window 3 on hello.py> 75 5))
timer-event-handler([t 24471 6093 761307 nil company-idle-begin (#<buffer hello.py> #<window 3 on hello.py> 75 5) nil 0])
This happens nomatter what I put in jedi:server-args.
Company completion seems to be working fine for elisp. I haven't tried any other backends. I appreciate this isn't a standard config, but it is difficult to have multiple venv setups in a Conda environment.