Codi errors on ubuntu 19.04/raspberry pi
sbromberger opened this issue · 3 comments
If you only have a quick question, consider posting it on the Gitter.
Otherwise, please include the following:
Issue description
When typing Codi python3
in a new vim session, the following errors are displayed:
Error detected while processing function codi#run[32]..<SNR>58_codi_spawn[95]..codi#update[5]..<SNR>58_codi_do_update:
line 17:
E730: using List as a String
line 47:
E121: Undefined variable: cmd
E116: Invalid arguments for function s:scriptify(cmd), { 'callback': 'codi#__vim_callback', 'env': {'SHELL': 'sh'}})
E116: Invalid arguments for function job_start(s:scriptify(cmd), { 'callback': 'codi#__vim_callback', 'env': {'SHELL': 'sh'}})
line 51:
E121: Undefined variable: job
E116: Invalid arguments for function job_getchannel(job)
line 52:
E121: Undefined variable: ch
E116: Invalid arguments for function s:ch_get_id(ch)
line 59:
E121: Undefined variable: job
line 60:
E121: Undefined variable: id
line 75:
E121: Undefined variable: ch
E116: Invalid arguments for function ch_sendraw
- A minimal
.vimrc
that will reproduce the issue
call plug#begin('~/.vim/plugged')
Plug 'metakirby5/codi.vim' " Playground support
call plug#end()
"
"{{{ Codi config
let g:codi#interpreters = {
\ 'python3': {
\ 'bin': '/usr/bin/python3',
\ 'prompt': '^\(>>>\|\.\.\.\) ',
\ },
\ }
- Exact steps to reproduce the issue, starting with the command used to open
vim foo.py
, then:Codi python3
Environment
-
Operating system
Linux red 5.3.0-1008-raspi2 #9+newupdate SMP Mon Oct 21 18:09:52 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
-
Version of
script
(if you don't know, just paste the last line of the
man page)
script from util-linux 2.34
-
The following in a pastebin, to reduce visual clutter:
- Entire output of
vim --version
- Entire output of
- Log lines (see
:h g:codi#log
)
[18:35:18.236991] <SNR>25_lo: Linux detected, using `script -qfec "$bin" /dev/null`
[18:35:18.260897] <SNR>25_user_au[1]: Doing autocommand CodiEnterPre
[18:35:18.286961] <SNR>25_user_au[1]: Doing autocommand CodiUpdatePre
[18:35:18.301889] <SNR>25_codi_do_update[29]: Starting job for buffer 1
[18:35:18.316984] <SNR>25_codi_do_update[68]: [INPUT]
[18:35:18.330676] <SNR>25_codi_do_update[69]: Expecting 2 prompts
[18:35:18.345374] <SNR>25_user_au[1]: Doing autocommand CodiEnterPost
[18:35:21.181765] <SNR>25_user_au[1]: Doing autocommand CodiLeavePre
[18:35:21.197145] <SNR>25_user_au[1]: Doing autocommand CodiLeavePost
Hi,
If I am not mistaken, the following (latest at the moment) commit 5466b11 is the culprit. Using the previous commit (0f5b8a9) works without issues.
In this line 5466b11#diff-989891772ea7990c8e545eed5d7303a5R392 is trying to add together a string and a list.
When I changed back to
let cmd = s:to_list(i['bin'])
worked with no issues.
Best Regards,
Panagiotis
P.S. I am using Fedora 31 and Neovim v0.4.2 if that matters any.
Hopefully fixed by #117 - let me know if you experience any issues!
I can confirm the latest master fixes the issue. Thank you very much for this really useful script!