You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ls -lah
Permissions Size User Date Modified Name
drwxr-xr-x - kde 2023-09-06 15:22 .
drwxr-xr-x - root 2023-08-18 00:24 ..
.rw-r--r-- 114 kde 2023-09-06 11:37 changelog.md
.rw-r--r-- 171 kde 2023-09-06 15:16 pyproject.toml
Trying to bump the version with:
$ bump-my-version --verbose --dry-run patch
WARNING:
Calling bumpversion without a subcommand is deprecated. Please use `bumpversion bump` instead
Starting BumpVersion 0.10.0
Reading config file pyproject.toml:
Parsing version '4.7.1' using regexp '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
Parsed the following values: major=4, minor=7, patch=1
Attempting to increment part 'patch'
Values are now: major=4, minor=7, patch=2
New version will be '4.7.2'
Dry run active, won't touch any files.
Asserting files None contain the version string...
I end up with this exception:
Traceback (most recent call last):
File "/Users/kde/.local/bin/bump-my-version", line 8, in <module>
sys.exit(cli())
^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/click/core.py", line 1157, in __call__returnself.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/rich_click/rich_group.py", line 21, in main
rv =super().main(*args, standalone_mode=False, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv =self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/click/core.py", line 1688, in invokereturn _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/click/core.py", line 1434, in invokereturn ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/click/core.py", line 783, in invokereturn __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/cli.py", line 309, in bump
do_bump(version_part, new_version, config, found_config_file, dry_run)
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/bump.py", line 83, in do_bump
modify_files(configured_files, version, next_version, ctx, dry_run)
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/files.py", line 212, in modify_files
_check_files_contain_version(files, current_version, context)
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/files.py", line 227, in _check_files_contain_version
f.contains_version(current_version, context)
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/files.py", line 68, in contains_versionifself.contains(search_expression):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/files.py", line 94, in contains
contents =self.get_file_contents()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kde/.local/pipx/venvs/bump-my-version/lib/python3.11/site-packages/bumpversion/files.py", line 39, in get_file_contentswithopen(self.path, "rt", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError: expected str, bytes or os.PathLike object, not NoneType
Instead, I expect bump-my-version to locate the changelog.md file and perform the search and replace action configured in the TOML file.
The text was updated successfully, but these errors were encountered:
Description
The
glob
pattern doesn't seems to locate the file I am looking for and end up in an exception.What I Did
Given this
changelog.md
file:Associated with this
pyproject.toml
configuration:The two files are in the same folder:
Trying to bump the version with:
I end up with this exception:
Instead, I expect
bump-my-version
to locate thechangelog.md
file and perform the search and replace action configured in the TOML file.The text was updated successfully, but these errors were encountered: