-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'PosixPath' object has no attribute 'rstrip' #197
Comments
changing module from pkg_resources to importlib in init.py solves this issue. from importlib import resources '# On initialization, load the IAM data" '# check = pkg_resources.resource_filename(name, "iam_definition.json") '# And the config data |
making a PR |
Related to issue duo-labs#197 Changed pkg_resources to importlib
Related to issue duo-labs#197 Changed pkg_resources to importlib for import config files
Getting this error while running parliament.
Traceback (most recent call last):
File "/repo/src/initialize_dbx_async_wp.py", line 24, in
from src import iam_policy_extractor
File "/repo/src/iam_policy_extractor.py", line 16, in
from parliament import analyze_policy_string
File "/repo/venv/lib/python3.9/site-packages/parliament/init.py", line 12, in
import pkg_resources
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 3268, in _initialize_master_working_set
tuple(
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 3269, in
dist.activate(replace=False)
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 2783, in activate
declare_namespace(pkg)
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 2282, in declare_namespace
_handle_ns(packageName, path_item)
File "/repo/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 2199, in _handle_ns
loader = importer.find_module(packageName)
File "", line 493, in _find_module_shim
File "", line 1428, in find_loader
File "", line 1473, in find_spec
File "", line 64, in _path_join
File "", line 64, in
AttributeError: 'PosixPath' object has no attribute 'rstrip'
The text was updated successfully, but these errors were encountered: