Troubleshooting¶
This guide covers common issues you might encounter when using releasio and how to resolve them.
Configuration Errors¶
Configuration file not found¶
Error: ConfigNotFoundError: Could not find pyproject.toml
Cause: releasio requires a pyproject.toml file with project metadata.
Solution:
- Ensure you're running releasio from your project root directory
- Verify
pyproject.tomlexists and contains a[project]section:
Invalid configuration values¶
Error: ConfigValidationError: Invalid configuration
Cause: Configuration values don't match expected types or constraints.
Solution:
- Check for typos in configuration keys (releasio uses
extra = "forbid"to catch these) - Verify all paths are valid
- Ensure version patterns follow semantic versioning
# Correct
[tool.releasio.version]
tag_prefix = "v"
# Wrong - 'prefix' instead of 'tag_prefix'
[tool.releasio.version]
prefix = "v" # This will error
Git Errors¶
Not a git repository¶
Error: NotARepositoryError: Not a git repository
Cause: The current directory is not initialized as a git repository.
Solution:
# Initialize git repository
git init
# Or navigate to the correct directory
cd /path/to/your/project
Dirty repository¶
Error: DirtyRepositoryError: Repository has uncommitted changes
Cause: You have uncommitted changes and allow_dirty = false in configuration.
Solution:
Tag already exists¶
Error: TagExistsError: Tag 'v1.0.0' already exists
Cause: You're trying to create a release with a version that's already tagged.
Solution:
-
Check existing tags:
-
If the tag was created by mistake, delete it:
-
Or bump the version manually:
Version Errors¶
Invalid version format¶
Error: InvalidVersionError: Invalid version: '1.0' (must follow PEP 440)
Cause: The version string doesn't follow PEP 440 format.
Solution:
Use a valid semantic version format:
# Valid versions
version = "1.0.0"
version = "2.1.0a1" # Alpha pre-release
version = "2.1.0b2" # Beta pre-release
version = "2.1.0rc1" # Release candidate
version = "1.0.0.post1" # Post-release
# Invalid versions
version = "1.0" # Missing patch
version = "v1.0.0" # No 'v' prefix in version string
version = "1.0.0-beta" # Use PEP 440 format: 1.0.0b1
Version not found¶
Error: VersionNotFoundError: Could not find version in project files
Cause: releasio couldn't locate the version in your project.
Solution:
Ensure version is defined in pyproject.toml:
Or configure custom version file locations:
GitHub Errors¶
Authentication failed¶
Error: AuthenticationError: GitHub authentication failed
Cause: Invalid or missing GitHub token.
Solution:
Rate limit exceeded¶
Error: RateLimitError: API rate limit exceeded. Resets at 2024-01-15T10:30:00Z
Cause: Too many GitHub API requests.
Solution:
- Wait for the rate limit to reset (shown in error message)
- Use a token with higher limits:
- Unauthenticated: 60 requests/hour
- Authenticated: 5,000 requests/hour
- Reduce API calls by running releasio less frequently
Publishing Errors¶
Build failed¶
Error: BuildError: Failed to build package
Cause: The package build process failed.
Solution:
-
Test the build locally:
-
Check for missing files in your
pyproject.toml: -
Verify MANIFEST.in includes all necessary files
Already published¶
Error: AlreadyPublishedError: mypackage 1.0.0 is already published
Cause: This version already exists on PyPI.
Solution:
PyPI doesn't allow overwriting published versions. You must:
-
Bump the version:
-
Or use a pre-release suffix:
Upload failed¶
Error: UploadError: Failed to upload to PyPI
Cause: Various issues with PyPI upload.
Solution:
- Check your credentials:
- For Trusted Publishing, ensure your GitHub workflow is configured correctly
-
For token auth, verify your
PYPI_TOKENis valid -
Verify package name availability:
-
Search PyPI to ensure the name isn't taken
-
Check network connectivity:
Changelog Errors¶
git-cliff not found¶
Error: ChangelogError: git-cliff not found, using native fallback
Cause: git-cliff is not installed (this is a warning, not an error).
Solution:
Empty changelog¶
Cause: No conventional commits found since the last release.
Solution:
-
Ensure you're using conventional commits:
-
Valid conventional commit formats:
-
Check your commit type configuration:
Common Issues¶
No version bump detected¶
Cause: Commits since last tag don't match any configured bump types.
Solution:
-
Check commits since last tag:
-
Ensure commits follow conventional format:
-
Verify configuration:
Pre-commit hooks fail¶
Cause: Code style or type errors before commit.
Solution:
-
Run formatters:
-
Fix type errors:
-
Skip hooks temporarily (not recommended):
Getting Help¶
If you can't resolve your issue:
- Check existing issues: GitHub Issues
- Search discussions: GitHub Discussions
- Open a new issue with:
- releasio version (
releasio --version) - Python version (
python --version) - Full error message and stack trace
- Your
pyproject.tomlconfiguration (remove sensitive data) - Steps to reproduce