Closed fuermosi777 closed 6 years ago
I have this problem, too
Same here, no matter which language I choose. I guess there might be some changes to leetcode's API.
It seems that leetcode had removed templates and testcase from pageData
https://github.com/skygragon/leetcode-cli/blob/8b7d55f9b53dac0bf1f26f04ba6b6fdb073d6aae/lib/plugins/leetcode.js#L148-L150
Yep, leetcode.com is using a new API o fetch question details, that's why we failed to get detailed info from "pageData" in the old html.
I have made a quick fix for it but have no time for a full regression testings right now (e.g. submission, star command, and 3rd party plugins). While you guys can still try it out now to see if there are other errors remained:
$ npm install -g skygragon/leetcode-cli
please ping me for any errors you meet, will revisit this tomorrow I hope.
It works for me. Thanks for your hotfix!
It is not totally fixed. I can show most problems properly now, but some not. For example, lc 537 still shows Unknown language error.
leetcode show 537 -g -x
@GameBurning try clean cache?
leetcode cache -d 537.complex-number-multiplication.algorithms
@skygragon Thanks! The cached json is the cause.
My two cents since I had the exact same problem...
Make sure we call "leetcode cache -d" before trying again after upgrading the leetcode cli. That will clean all caches and will make sure we don't see similar problems again.
Reinstallation and cleaning the cache solved the problem for me.
npm install -g skygragon/leetcode-cli
leetcode cache -d true
Worked after upgrading to 2.1.0 and clear cache.
I meet this problem again : [ERROR] Unknown language "cpp" [0] yesterday I have upgraded to new version 2.1 and work well but the issue appears today
@Pyboon give another try after running leetcode cache -d
?
still have trouble
@Pyboon 175/176/181 are all sql questions, so "cpp" doesn't work for them. please try:
leetcode show 175 -gx -l mysql
I found that some problems occured the issue but some did not, for example problem #181,#176.#175 had but #198 not, I just try some problems and do not konw the detail of other problems
@Pyboon in the case you could omit "-gx" in your show command then you could see the question details first before generating source code via "-g".
Problem Summary
run
leetcode show 523 -x -g
, got an error[ERROR] Unknown language "javascript" [0]
How to reproduce
Skip
Environment
[Environment] Node v7.7.2 OS darwin 17.2.0
[Configuration] AUTO_LOGIN true COLOR_THEME default ICON_THEME LANG javascript MAX_WORKERS 10 USE_COLOR true
[Themes] Colors blue,dark,default,orange,pink Icons ascii,default,win7