Skip to content
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

Error on importing OneLoginClient #24

Closed
pattyr opened this issue Nov 9, 2018 · 1 comment
Closed

Error on importing OneLoginClient #24

pattyr opened this issue Nov 9, 2018 · 1 comment

Comments

@pattyr
Copy link

pattyr commented Nov 9, 2018

Hello!

I receive this error when our code tries to import OneLoginClient

/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/Users/pattyr/.virtualenvs/onelogintest19/bin/onelogin-aws", line 7, in <module>
    from onelogin_aws import main
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/onelogin_aws/__init__.py", line 12, in <module>
    from onelogin.api.client import OneLoginClient
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/onelogin/api/client.py", line 14, in <module>
    import requests
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/requests/__init__.py", line 112, in <module>
    from . import utils
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/requests/utils.py", line 26, in <module>
    from ._internal_utils import to_native_string
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/requests/_internal_utils.py", line 11, in <module>
    from .compat import is_py2, builtin_str, str
  File "/Users/pattyr/.virtualenvs/onelogintest19/lib/python2.7/site-packages/requests/compat.py", line 48, in <module>
    from urllib3.packages.ordered_dict import OrderedDict
ImportError: No module named ordered_dict

The script has worked well in the past and I think it might be related to this:
urllib3/urllib3#1456

OneLogin Python SDK has a hard requirement on requests==2.19.1.
That version of requests has a requirement of urllib3>=1.21.1,<1.24

This is my current virtual environment:

Python 2.7.14
boto3==1.9.41
botocore==1.12.41
certifi==2018.10.15
chardet==3.0.4
configparser==3.5.0
defusedxml==0.5.0
docutils==0.14
futures==3.2.0
idna==2.7
jmespath==0.9.3
lxml==4.2.3
mt-onelogin-aws==1.1.4
onelogin==1.5.1
python-dateutil==2.7.3
requests==2.19.1
s3transfer==0.1.13
six==1.11.0
urllib3==1.24.1

requirements.txt contains:

boto3
onelogin

Please let me know if I can provide anymore information. Thank you!

@pattyr pattyr changed the title Error importing import OneLoginClient Error on importing OneLoginClient Nov 9, 2018
@pitbulk pitbulk closed this as completed in 47fc28a Nov 9, 2018
@pattyr
Copy link
Author

pattyr commented Nov 9, 2018

Thank you for the quick response and turn around, I really appreciate it! :)
I saw pypi was updated but am getting the same error. I just noticed setup.py still had requests==2.19.1
https://github.com/onelogin/onelogin-python-sdk/blob/master/setup.py#L41

luisvm pushed a commit to luisvm/onelogin-python-sdk that referenced this issue Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant