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

standart out to long #154

Open
OdysseusOperator opened this issue May 13, 2024 · 4 comments
Open

standart out to long #154

OdysseusOperator opened this issue May 13, 2024 · 4 comments

Comments

@OdysseusOperator
Copy link

So i was debugging code with long print calls.
And then i got " 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"

But one the website my code is working.

Minimal example that produces the error: ( on execises 26 in python3)

from typing import *
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        print(f'nums are now {nums} and u')
        return 1 
@clearloop
Copy link
Owner

clearloop commented May 13, 2024

this could be a problem that your session is outdated, see Cookies, or the network was currently just bad ( got invalid JSON response ) ...

Ideally, we should provide more detailed errors on receiving invalid JSON responses, for example checking the status code in this kind of places https://github.com/clearloop/leetcode-cli/blob/master/src/plugins/leetcode.rs#L78

PRs are welcome ^ ^

@OdysseusOperator
Copy link
Author

Ok, but this code is valid (just a few letters less).
So i guess it is not about the csrf token.

from typing import *
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        print(f'nums are now {nums}')
        return 1

@clearloop
Copy link
Owner

clearloop commented May 14, 2024

Ok, but this code is valid (just a few letters less). So i guess it is not about the csrf token.

from typing import *
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        print(f'nums are now {nums}')
        return 1

oh it's not about the code itself, but the http requests and the cookies, the code was not sent to leetcode's server correctly

@pablo-cardenas
Copy link

I also have the same problem. It worked well three days ago.

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