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
Describe the bug pkgutil.iter_modules breaks if a Path is passed instead of a str on some versions of python. This is due to a regression in Python. See the original issue report here: https://bugs.python.org/issue44061
To Reproduce
Try:
from pathlib import Path
from pkgutil import iter_modules
package_dir = Path('.')
iter_modules([package_dir])
>> AttributeError: 'PosixPath' object has no attribute 'startswith'
Environment (please complete the following information):
OS: Ubuntu 20.04.2 LTS
OpenKiwi version: 2.1.0
Python version: 3.8.10
Additional context
A simple fix is to convert Path to str:
iter_modules([str(package_dir)])
File where the error occurs: kiwi/systems/__init__.py
The text was updated successfully, but these errors were encountered:
Describe the bug
pkgutil.iter_modules
breaks if aPath
is passed instead of astr
on some versions of python. This is due to a regression in Python. See the original issue report here: https://bugs.python.org/issue44061To Reproduce
Try:
Environment (please complete the following information):
Additional context
A simple fix is to convert
Path
tostr
:File where the error occurs:
kiwi/systems/__init__.py
The text was updated successfully, but these errors were encountered: