cf-tool
cf-tool copied to clipboard
Warning:Choose valid language
When I enter "cf submit", it returns the warning of "Choose valid language" which hadn't occur before.
Me too. I think it might that the language can not be used. But I try to set a new template. After it, I still can not solve this problem.
Me too. I think it might that the language can not be used. But I try to set a new template. After it, I still can not solve this problem.
perhaps codeforces change its api?
I had the same problem. Codeforces changed its set of languages, removing the one that I was using in my template.
The quick fix:
- Go to https://codeforces.com/contest/1956/submit (or any other contest) and inspect
Language
dropdown using your browser developer tools - you'll see list of languages and their ids. - Go to https://github.com/xalanq/cf-tool/blob/master/client/langs.go - this is a list of languages hardcoded into cf-tool
- Find ID for your language that appears in both lists. For C++, the best choice as of today is
54 - GNU G++17 7.3.0
. - Use
cf config
to delete your old template, then create the new template (instructions for CP editor) and chose language ID from previous step.
picking a language id from inspecting the dropdown seems to work, even if it's not in the hardcoded list of cf-tool