Troubleshooting
Setup issues
ModuleNotFoundError: No module named 'anthropic'
The required AI provider package is not installed.
ModuleNotFoundError: No module named 'PyGithub'
PyGithub is only needed for GitHub repo input. Install it if you're pointing --input at a GitHub repository:
ModuleNotFoundError: No module named 'jinja2'
Configuration issues
Error: config.yaml not found
The script looks for config.yaml at ../config.yaml relative to the script location by default. Run from the 03-readme-generator/ directory, or pass the config path explicitly:
Error: 'ai_provider' not found in config
Your config.yaml is missing required fields. At minimum, the file needs:
Copy config.example.yaml from the project root and fill in your values.
AuthenticationError or 401 Unauthorized
Your API key is invalid or not set. Check:
ai_api_keyinconfig.yamlmatches the key from your provider's dashboard- No extra spaces or quotes around the key value
- The key has not expired or been revoked
GitHub input issues
GithubException: 401 Unauthorized (GitHub)
Your GitHub token is missing or invalid. Add it to config.yaml:
Tokens need repo scope to access private repositories. Public repos do not require a token.
GithubException: 404 Not Found (GitHub)
The repository slug is incorrect, the repo is private and your token lacks access, or the repo does not exist.
Verify the slug format: owner/repo (no https://, no .git).
Rate limit errors from GitHub
GitHub's unauthenticated API rate limit is 60 requests/hour. Add a GitHub token to increase this to 5,000 requests/hour:
Generation issues
Output is generic or inaccurate
The AI generates content from the context it receives. If output is generic:
- Run
--analyzeto see what context was extracted - Check whether your project name, language, and dependencies were detected correctly
- Add a stub
README.mdto your project with a one-paragraph description - Add docstrings to entry point files
See Step 2: Analyze your repo for details.
Generated install commands don't work
AI infers install commands from dependency files. Common problems:
- No recognized dependency file in the root directory (
requirements.txt,package.json,go.mod, etc.) - Dependency file is in a subdirectory (the script only looks one level deep for dependency files)
- Project requires a build step not reflected in the dependency file
Fix: Add the correct commands explicitly in installation_prompt.txt:
KeyError: 'description_section' during assembly
A section failed to generate but the template still expected it. This usually means the AI call for that section returned an error or empty response.
Check the terminal output for error messages during section generation, and verify your API key has sufficient quota.
Output file is empty or truncated
Disk write error, or the script was interrupted. Run again — generation will start from scratch.
Token and cost issues
API quota exceeded
If you hit your API quota mid-generation, the script will error on the failing section. Generated sections before the error are not written to the output file.
Wait for your quota to reset, or use --sections to regenerate only the section that failed:
Generation is slow
Each section is a separate API call. Four sections means four round trips. If latency is the issue:
- Use
--sectionsto generate only the sections you need - Run
--analyzefirst to verify context quality before spending tokens on generation
Template issues
TemplateNotFound or UndefinedError in template
Your custom template references a variable that doesn't exist. Available variables are listed in the configuration reference.
Check for typos in variable names: {{ description_section }} not {{ description }}.
Template renders with empty sections
The section variable is empty, which means that section was not generated. Either:
- The section name was not in --sections (omitting --sections generates all four)
- The section generation failed silently
Run without --sections to generate all sections, or check terminal output for errors.