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

Expected line error #149

Open
MostlyKIGuess opened this issue Mar 9, 2024 · 5 comments
Open

Expected line error #149

MostlyKIGuess opened this issue Mar 9, 2024 · 5 comments

Comments

@MostlyKIGuess
Copy link

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'

@elgar328
Copy link

elgar328 commented Mar 9, 2024

I also have the same problem.

@cjon256
Copy link

cjon256 commented Mar 9, 2024

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.

@TJSolecki
Copy link

Same here

@MostlyKIGuess
Copy link
Author

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..

@rnarenpujari
Copy link

rnarenpujari commented Mar 13, 2024

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.

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

5 participants