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

When input is null, plugin runs error #33

Open
utbuiquoc opened this issue Apr 16, 2023 · 2 comments
Open

When input is null, plugin runs error #33

utbuiquoc opened this issue Apr 16, 2023 · 2 comments

Comments

@utbuiquoc
Copy link

utbuiquoc commented Apr 16, 2023

image

I've just started using neovim, I'm not sure why I'm getting this error.
Add input and it works, if not add input will run error.

Error executing luv callback:
...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:214: bad argument #2 to 'write' (data must be string or table of strings, got nil)
stack traceback:
        [C]: in function 'write'
        ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:214: in function 'execute_testcase'
        ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:129: in function 'run_first_testcases'
        ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:139: in function 'callback'
        ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:202: in function <...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:168>
Press ENTER or type command to continue
Error executing luv callback:
...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:170: attempt to index field 'process' (a nil value)
stack traceback:
        ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:170: in function <...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:168>
Press ENTER or type command to continue
@utbuiquoc utbuiquoc changed the title Error when running with lazy.nvim When input is null, plugin runs error Apr 17, 2023
@xeluxee
Copy link
Owner

xeluxee commented Apr 17, 2023

As README.md states,

Input is necessary for a testcase to be considered, while an output hasn't to be provided necessarily

As a workaround if your program doesn't use stdin you can still write something in testcase input, like a space.
I can fix this, but why would you need an empty input in a competitive programming task?

@utbuiquoc
Copy link
Author

utbuiquoc commented Apr 18, 2023

Sorry to bother, I just find it a bit annoying when it shows the error.

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

No branches or pull requests

2 participants