xeluxee / competitest.nvim

CompetiTest.nvim is a Neovim plugin for Competitive Programming: it can manage and check testcases, download problems and contests from online judges and much more
GNU Lesser General Public License v3.0
381 stars 15 forks source link

Running :CompetiTest commands throw `trailing data in msgpack string` error #41

Closed AdityaMayukhSom closed 10 months ago

AdityaMayukhSom commented 10 months ago

I have been trying to integrate CompetiTest with my neovim setup for 2 days, but everytime I try to install and run the plugin, it throws the following error. I have searched regarding this error but haven't found any answers. My directory structure is shown in the following image.

image

I am attaching one sample command's output for reference, but every CompetiTest command is throwing same error. I am running Ubuntu 22.04 on Windows 11 WSL2. I have tried both the default config and the custom config but the error still stays the same.

:CompetiTest run
E5108: Error executing lua ...ker/start/competitest.nvim/lua/competitest/testcases.lua:256: trailing data in msgpack string
stack traceback:
        [C]: in function 'loader2'
        ...ker/start/competitest.nvim/lua/competitest/testcases.lua:256: in function 'buf_get_testcases'
        ...cker/start/competitest.nvim/lua/competitest/commands.lua:261: in function 'run_testcases'
        ...cker/start/competitest.nvim/lua/competitest/commands.lua:78: in function 'sub'
        ...cker/start/competitest.nvim/lua/competitest/commands.lua:103: in function 'command'
        [string ":lua"]:1: in main chunk

Kindly help me with this error and if any further clarification is required, I will be happy to share that.

xeluxee commented 10 months ago

Looks like A.testcases is corrupted. Delete it and remake it from scratch using :CompetiTest add_testcase or :CompetiTest receive.

Also you should delete lines 5-8. There's no need to freopen input.txt and output.txt. As README states

Your programs must read from stdin and print to stdout. If stderr is used its content will be displayed

xeluxee commented 10 months ago

If your problem is fixed please close this issue