onelogin / onelogin-python-aws-assume-role

MIT License
58 stars 51 forks source link

OneLogin Python SDK v3.0.0 causes ModuleNotFoundError #76

Open drewdavies opened 1 year ago

drewdavies commented 1 year ago

It appears that the release of the OneLogin Python SDK v3.0.0 breaks the current onelogin-python-aws-assume-role implementation.

Traceback (most recent call last):
  File "/Users/user/.local/bin/onelogin-aws-assume-role", line 5, in <module>
    from aws_assume_role.aws_assume_role import main
  File "/Users/user/.local/pipx/venvs/onelogin-aws-assume-role/lib/python3.10/site-packages/aws_assume_role/aws_assume_role.py", line 17, in <module>
    from onelogin.api.client import OneLoginClient
ModuleNotFoundError: No module named 'onelogin.api.client'

In the interim, pinning the dependency to v2.0.3 resolves the issue:

https://github.com/onelogin/onelogin-python-aws-assume-role/blob/6087324edc8a017496861b2b89ef8832b63a1ddc/setup.py#L40

liorfranko commented 1 year ago

+1

orarnon commented 1 year ago

+1

alanbrent commented 1 year ago

+1

Note for those installing this script via pip: We have solved this by installing via pip install -r requirements.txt, where requirements.txt looks like this:

onelogin!=3.0.0
onelogin-aws-assume-role
ehealy commented 1 year ago

+1

yossi-silberhaft commented 1 year ago

I changed the Dockerfile to use the set version of 2.0.4 and it works for me RUN pip install boto3 lxml onelogin==2.0.4

bdellegrazie commented 1 year ago

Note also that this problem still exists with onelogin==3.0.1

xadamxk commented 4 months ago

Bumping for visibility.