E5108: Error executing lua ...es/neovim/.config/nvim/plugged/vim-ultest/lua/ultest.lua:60: attempt to index local 'test' (a userdata value)
See original GitHub issueDescribe the bug
While trying to run a TypeScript (filetype typescript
) test with UltestDebugNearest
, I run into this:
E5108: Error executing lua ...es/neovim/.config/nvim/plugged/vim-ultest/lua/ultest.lua:60: attempt to index local 'test' (a userdata value)
The vim-ultest.log
file contains this:
10:02:19 | INFO | MainThread | logging.py:create_logger:74 | Logger created
10:02:19 | DEBUG | MainThread | __init__.py:__init__:40 | Handler created
Additional context
nvim --version
NVIM v0.5.0-dev+1231-g48e805728
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/nvim/parts/nvim/build/build/config -I/build/nvim/parts/nvim/build/src -I/build/nvim/parts/nvim/build/.deps/usr/include -I/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include
Compiled by root@lgw01-amd64-055
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
python --version
Python 3.8.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:25 (9 by maintainers)
Top Results From Across the Web
C++ LuaBridge attempt to index a userdata value (local 'self')
I'm generating keys for each class and storing those keys in the Lua registry. The key generation uses a static templated method that...
Read more >Development troubleshooting - Minetest Developer Wiki
... call a method from it, I get a Lua error that says something along the lines of "attempt to index local 'objecthere'...
Read more >attempt to concatenate local 'message' (a userdata value ...
I've been trying to make a chat and I've been running into this problem where it says "attempt to concatenate local 'message' (a...
Read more >Attempt to call a userdata value - Scripting Support - DevForum
hello robloxians, i tried to make npc that teleport to brick when player comming to ... You should test your scripts before making...
Read more >openresty 执行错误,有人能帮我分析下原因吗?
... 15773#0: *16809007 lua entry thread aborted: runtime error: /opt/openresty/lua/test.lua:82: attempt to index local 'res1_body' (a userdata value).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rcarriga Sorry for the noise on this one. Turns out I needed to run
:UpdateRemotePlugins
, and then everything started workingSo there was a number of issues that you raised so I’ll address separately.
test#filename_modifier
variable will now be respectedg:test#project_root
as the current working directory if it existsg:ultest_pre_run
which should be a function name, which will be called before any test is run withUltest
,UltestNearest
,UltestDebugNearest
and the corresponding<Plug>
mappingsAs I said before, you will have to manually configure nvim-dap to respect the project root.
Also the reason vim-test doesn’t detect your file as a test is because it can’t tell if your runner is installed. Simply explicitly state what your runner is so for example with javascript/typescript and jest
Please let me know if anything isn’t working as expected!