Skip to content

error: expected value at line 1 column 1 #55

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

Closed
hao-lee opened this issue Jan 10, 2022 · 5 comments
Closed

error: expected value at line 1 column 1 #55

hao-lee opened this issue Jan 10, 2022 · 5 comments

Comments

@hao-lee
Copy link
Contributor

hao-lee commented Jan 10, 2022

Hello, I encountered a strange problem... Can't figure out what's wrong 😢 ... Thanks.

~# leetcode pick 55
~# leetcode edit 55 # add a line: return True
~# leetcode test 55
[INFO  leetcode_cli::plugins::leetcode] Sending code to judge...
error: expected value at line 1 column 1
@hao-lee
Copy link
Contributor Author

hao-lee commented Jan 10, 2022

Solved. The root cause is my cookie is expired. Maybe we can output some possible reasons in this error message to help users to figure out what's wrong.

@hao-lee hao-lee closed this as completed Jan 10, 2022
@bulletmark
Copy link

OP, you should re-open this as it is a valid bug. "error: expected value at line 1 column 1" is not a clear message that the users cookie has expired, particularly when it will happen quite frequently.

@clearloop
Copy link
Owner

this error emits from parsing json response failed, if you run commands with -d flag, you can see the detail of the error

btw we definitely should optimize this

@hao-lee
Copy link
Contributor Author

hao-lee commented Jan 11, 2022

@bulletmark Yeah. This does make sense.
@clearloop Yes, -d definitely shows the failed line, although it doesn't give more information about how to solve the problem. I was inspired by other closed issues. Any exception that can corrupt the json response can lead to this error. Let me re-open this issue 😏

@clearloop
Copy link
Owner

#67

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

3 participants