Bloom error about invalid version
I get this error when running bloom-release. I've installed bloom via pip on Ubuntu 22.04. My python version is 3.10.6
Traceback (most recent call last):
File "/usr/bin/bloom-release", line 11, in <module>
load_entry_point('bloom==0.11.2', 'console_scripts', 'bloom-release')()
File "/home/tyler/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 534, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/tyler/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2930, in load_entry_point
return ep.load()
File "/home/tyler/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2517, in load
return self.resolve()
File "/home/tyler/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2523, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/bloom/commands/__init__.py", line 42, in <module>
from bloom.commands.update import start_updater
File "/usr/lib/python3/dist-packages/bloom/commands/update.py", line 49, in <module>
from bloom.logging import warning
File "/usr/lib/python3/dist-packages/bloom/logging.py", line 63, in <module>
_is_mac_lion_or_greater = parse_version(mac_ver()[0]) >= parse_version('10.7.0')
File "/home/tyler/.local/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/version.py", line 197, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ''
I've troubleshooter this by commenting out the offending line in logging.py and setting the value about the mac version to False. The problem then shows up again later when calculating another version. I wonder if the parse_version function changed?
I ran bloom-release on another computer and see a flood of these errors:
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: upstream/2.5.0 is an invalid version and will not be supported in a future release
Looks like ros-infrastructure/bloom#678, which is fixed by ros-infrastructure/bloom#693.
Seeing as the last release was over two years ago, you probably need to install using
pip
and install from the repository directly to get that fix.PS:
I don't see that version being tested in the CI configuration btw.