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

AttributeError: 'module' object has no attribute 'verify_ssl' #1

Open
agent-z28 opened this issue Jun 8, 2020 · 1 comment
Open

Comments

@agent-z28
Copy link

We tried the API EXAMPLE and got mutiple issues.

(The provided Example has a broken intendation and the import of the configuration is missing)

a)Intendation is broken
b)In the example there's no import of the configuration.
c)adding "from samsara import configuration" leads to

with samsara.ApiClient(configuration) as api_client:
File "/usr/local/lib/python3.6/dist-packages/samsara/api_client.py", line 75, in init
self.rest_client = rest.RESTClientObject(configuration)
File "/usr/local/lib/python3.6/dist-packages/samsara/rest.py", line 60, in init
if configuration.verify_ssl:
AttributeError: module 'samsara.configuration' has no attribute 'verify_ssl'

@av1m
Copy link

av1m commented Aug 10, 2020

The problem comes from the Configuration class
To authenticate yourself, you don't have to go through the Configuration class. You can try something like this

with samsara.ApiClient(header_name='Authorization', header_value=f"Bearer {token}") as api_client:

If you want to use the Configuration class, you have an example here

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

2 participants