Closed jiaqiwang969 closed 1 year ago
I get the same error (with different column number) when doing leetcode test <id>
The error seems to be a Rust error, I am writing leetcode solutions in Python, stored in default .leetcode/code location
The previous language for solutions was Rust, which is what I originally pulled the Problems in via. leetcode list
and leetcode pick <id>
- only after using leetcode edit <id>
with Rust as the language, did I switch the language to Python - not sure if this is the cause for the error i.e. submissions for tests are still being sent as Rust ones even though the solution is in Python...
As morristai mentioned earlier, you can fix that issue with:
cargo install --git https://github.com/clearloop/leetcode-cli
It will update your leetcode-cli
with newer version, so don't bother to delete the old version.
And you can make sure the latest version is installed with:
$ leetcode -V
# result -> leetcode-cli 0.3.12
code
section in ~/.leetcode/leetcode.toml
should look like:
[code]
editor = "lvim"
lang = "python3"
edit_code_marker = false
comment_problem_desc = false
comment_leading = "///"
start_marker = "@lc code=start"
end_marker = "@lc code=start"
test = true
pick = "${fid}.${slug}"
submission = "${fid}.${slug}.${sid}.${ac}"
[INFO leetcode_cli::plugins::leetcode] Sending code to judge... error: invalid type: sequence, expected a string at line 1 column 221