skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 459 forks source link

question about test with python3 #65

Closed wnykuang closed 5 years ago

wnykuang commented 7 years ago

Problem Summary

When I have ran the leetcode test ./3.longest-substring-without-repeating-characters.py -i 'abc'

it shows: ✘ Runtime Error ✘ runtime: N/A ✘ answer: ✘ stdout: '' ✘ error: Line 66: ValueError: No JSON object could be decoded

How to reproduce

try any cpp/python with leetcode test ./[file] should reproduce the problem

Environment

skygragon commented 7 years ago

-i is used to read testcase from stdin, for your case please try use -t instead?

leetcode test ./3.longest-substring-without-repeating-characters.py -t 'abc'
zshihang commented 6 years ago

i suggest adding a flag -l for leetcode submit to specify the language of file we submit or make .lcconfig visible to leetcode submit.

p.s. leetcode-cli will set the python3 file with extention ".py3" which is pretty rare in python world. vim also doesn't regard ".py3" as a python file by default.

skygragon commented 6 years ago

@shihan9 there is another python3 thread: #55