commitizen
commitizen copied to clipboard
cz bump cannot find version scheme "semver" after upgrade
Description
After upgrading from 3.8.0 to 3.8.2 i get the following error:
$ cz bump --dry-run
Version scheme "semver" unknown.
Steps to reproduce
- pip install commitizen --upgrade
- cz bump --dry-run
Current behavior
The following error is given:
Version scheme "semver" unknown.
Desired behavior
cz bump works as its supposed to
Screenshots
No response
Environment
$ cz version
3.8.2
$ python --version
Python 3.11.5
$ python -c "import platform; print(platform.system())"
Windows
$ cz version --report
Commitizen Version: 3.8.2
Python Version: 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Operating System: Windows
YAML config:
---
commitizen:
name: cz_conventional_commits
tag_format: v$major.$minor.$patch$prerelease.$devrelease
version: 2.0.2
version_files:
- source/OptionsManager/OptionMacros.h:FIRMWARE_VERSION_CSTRING
- source/doxygen/Doxyfile:PROJECT_NUMBER
version_scheme: semver
update_changelog_on_bump: true
changelog_merge_prerelease: true
changelog_incremental: true
Tried solutions:
Running pip install --upgrade --force-reinstall commitizen
does not fix the issue.
Running pip install --upgrade --force-reinstall commitizen==3.8.0
to revert also does not fix the issue.
Removing version_scheme: semver
from cz.yaml results in
cz bump --dry-run
Version Provider "commitizen" unknown.
cz changelog
and cz version -p
also result in the same errors.
Could #830 have caused this issue?
Debug output:
cz --debug version -p
Version Provider "commitizen" unknown.
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\commitizen\providers\__init__.py", line 42, in get_provider
(ep,) = metadata.entry_points(name=provider_name, group=PROVIDER_ENTRYPOINT)
^^^^^
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Python311\Scripts\cz.exe\__main__.py", line 7, in <module>
File "C:\Python311\Lib\site-packages\commitizen\cli.py", line 463, in main
args.func(conf, vars(args))()
File "C:\Python311\Lib\site-packages\commitizen\commands\version.py", line 25, in __call__
version = get_provider(self.config).get_version()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\commitizen\providers\__init__.py", line 44, in get_provider
raise VersionProviderUnknown(f'Version Provider "{provider_name}" unknown.')
commitizen.exceptions.VersionProviderUnknown: Version Provider "commitizen" unknown.
C:\Users\Jelle\Documents\GITREPOS\timeseal-ecu-firmware-phase-b>
The problem seems to be caused by the remnants of the previous version left behind by PIP.
Deleting these folders from the pip installation directory fixes the issue.
I'm not sure if this is Pip issue or if it can be fixed here.