lcpy gen resolves numbers and tags against the JSON catalog bundled with
your installed version. The error means the number, name, or tag is not in
that catalog. A close cousin, reported as a warning during bulk runs:
Reproduce
Fix
- Check what ships with your version: run
lcpy list, orlcpy list -t <tag>for one collection. Only listed problems can be generated. - With
-s, spell the name exactly as the repo does, underscored:two_sum,valid_palindrome. The hyphenated form (two-sum) is the LeetCode URL slug and matches nothing. Numbers via-nsidestep spelling entirely:
- Problem added to the repo after you installed: upgrade the package,
pip install --upgrade leetcode-py-sdk, then generate again. - Problem not in the catalog at all: it has to be scraped and added first; see Problem Creation.