leetcode-cli icon indicating copy to clipboard operation
leetcode-cli copied to clipboard

Expected line error

Open MostlyKIGuess opened this issue 1 year ago • 5 comments

Error:

❯ leetcode data -u
[INFO  leetcode_cli::cache] Fetching leetcode problems...
error: error decoding response body: expected value at line 1 column 1, please try again
  • I read through the previous issues and their problem was fixed because they had expired cookies but I tried resetting the cookies and it's still not working.
  • My leetcode.toml:
[code]
editor = 'vim'
lang = 'cpp'
comment_problem_desc = true
# comment syntax
comment_leading = "//"
test = true
inject_before = ["#include<bits/stdc++.h>", "using namespace std;"]
inject_after = ["int main() {\n    Solution solution;\n\n}"]

[cookies]
csrf = 'aslkalskfjlasksjflaskjflaskjflaskjflasjlfkjas'
session = 'laksflkasjflkasjfl.alsflaskfjlaskflashflashflasjhflasjfhlajfhlasjfhlasjfhlasfhlasf.laskjflasjflasjf'

[storage]
cache = 'Problems'
code = 'code'
root = '~/.leetcode'
scripts = 'scripts'

MostlyKIGuess avatar Mar 09 '24 10:03 MostlyKIGuess

I also have the same problem.

elgar328 avatar Mar 09 '24 12:03 elgar328

This problem also happens with other tools like leetscrape. So my guess is that leetcode made changes to their api. e.g. It gives a very similar json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) error. Given that is Python and gives a similar error, my best guess is it is a change on their end.

cjon256 avatar Mar 09 '24 19:03 cjon256

Same here

TJSolecki avatar Mar 10 '24 04:03 TJSolecki

This problem also happens with other tools like leetscrape. So my guess is that leetcode made changes to their api. e.g. It gives a very similar json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) error. Given that is Python and gives a similar error, my best guess is it is a change on their end.

Yeah I think so too..

MostlyKIGuess avatar Mar 10 '24 04:03 MostlyKIGuess

now i'm going to get busted using the web ui at work smh

edit: when i tried a couple days ago, pick wasn't working with the above error I believe. Now pick goes through but test & exec don't.

❯ lc test 100
[INFO  leetcode_cli::plugins::leetcode] Sending code to judge...
JSON error: expected value at line 1 column 1, please double check your session and csrf config. JSON error: expected value at line 1 column 1, please double check your session and csrf config.

rnarenpujari avatar Mar 13 '24 05:03 rnarenpujari