Deoplete.nvim: Error in child: TypeError("'str' object does not support item assignment",).

Created on 26 Dec 2018  路  6Comments  路  Source: Shougo/deoplete.nvim

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

When I open NVIM and go into INSERT mode, I get the following error:

[deoplete] Traceback (most recent call last):                                                                                                                                                                           
  File "/home/bytebeast/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/dp_main.py", line 56, in main
    child.main_loop(stdout)
  File "/home/bytebeast/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 65, in main_loop
    ret = self.main(name, args, queue_id)
  File "/home/bytebeast/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 82, in main
    ret = self._merge_results(args[0], queue_id)
  File "/home/bytebeast/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 152, in _merge_results
    result, context['input'], context['next_input'])
  File "/home/bytebeast/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 363, in _get_candidates
    candidate['icase'] = 1
TypeError: 'str' object does not support item assignment
Error in child: TypeError("'str' object does not support item assignment",).  Use :messages / see above for error details.

I have re-installing pip packages and :UpdateRemotePlugins

Expected

No error expected when going into insert mode.

Environment Information

  • deoplete version (SHA1):
commit 3ddbcf51d352d2b431acaced6c1c2489355741f6 (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Shougo <[email protected]>
Date:   Wed Dec 26 04:39:43 2018

    Merge pull request #896 from reaysawa/parameterized-around

    Update around source to accept custom values
  • OS:
            .-/+oossssoo+/-.               bytebeast@tackpulse 
        `:+ssssssssssssssssss+:`           ------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 18.04.1 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: XPS 15 9560 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 4.19.11-041911-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 16 hours, 50 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 3488 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 4.4.19 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 3840x2160 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 3.28.3 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: GNOME Shell 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Ambiance 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Ambiance [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Elementary-mono-dark [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-7700HQ (8) @ 3.800GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce GTX 1050 Mobile 
      -+sssssssssssssssssyyyssss+-         GPU: Intel HD Graphics 630 
        `:+ssssssssssssssssss+:`           Memory: 3829MiB / 31707MiB 
            .-/+oossssoo+/-. 


  • neovim/Vim :version output:
:version
NVIM v0.3.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_
FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLAR
ATIONS -D_GNU_SOURCE -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-xZey2V/neovim-0.3.1/build/config -I/build/neovim-xZey2V/neovim-0.3.1/src -I/usr/include -I/build/neovim-xZey2V/neovim-0.3.1/build/src/nvim/auto -I/build/neovim-xZe
y2V/neovim-0.3.1/build/include
Compiled by [email protected]

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • pip package versions
$ pip3 list | egrep "neovim|pynvim"
neovim (0.3.1)
pynvim (0.3.1)
  • :checkhealth or :CheckHealth result(neovim only):
health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xsel

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/bin/python2
  - INFO: Python2 version: 2.7.15
  - INFO: python2-neovim version: 0.3.1
  - OK: Latest python2-neovim is installed: 0.3.1

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python3 version: 3.6.7
  - INFO: python3-neovim version: 0.3.1
  - OK: Latest python3-neovim is installed: 0.3.1

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
  - INFO: Host: /usr/local/bin/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.7.1

## Node.js provider (optional)
  - INFO: Node.js: v8.10.0
  - INFO: Neovim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.2.1

health#deoplete#check
========================================================================
## deoplete.nvim
  - OK: exists("v:t_list") was successful
  - OK: has("timers") was successful
  - OK: has("python3") was successful
  - OK: Python3.5+ was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

minimal init.vim/vimrc with less than 50 lines (Required!)

set runtimepath+=~/.vim/plugged/deoplete.nvim/
let g:deoplete#enable_at_startup = 1

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Run "nvim"
  2. Go into "insert" mode in nvim
  3. Then I see error

terminal_002

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. Go into "Insert" mode.

Only one log file generated is /tmp/log_py3_rplugin , log file attached log_py3_rplugin.txt

Screenshot (if possible)

Upload the log file

log_py3_rplugin.txt

Most helpful comment

Please update deoplete.
I have fixed it.

All 6 comments

I'm getting the exact same error as you. It looks like the problem was introduced in 3ddcc5497ed1f1e5362410eaec8582dc86b946a1, although I don't understand why, based on the contents of that commit (it could also be that the bug was dormant and was somehow triggered by the change). A temporary fix would be to add either { 'commit': '82a15cc5de88b520ee924ed503c1e9166bb6ecc4' } (the last commit that appears to be non-broken for me) or { 'tag': '4.1' } (the most recent semver release) to your plug command (or whatever the equivalent would be for your plugin manager).

It is not related the commit.
I don't know why the problem was not been occurred.

Please update deoplete.
I have fixed it.

Please update deoplete.
I have fixed it.

Thanks @Shougo

The latest update solved the issue for me. Thanks @Shougo

Was this page helpful?
0 / 5 - 0 ratings