Hello
Good day to you.
I use same code success in one PC but fail on a new PC. I don't understand how to use certificate_path. some topic said can fix by specify cert path. I try to download dashboard.meraki.com website certificate, but still not work.
With certificate_path or not, I got same below error.
May you please advise how to fix?
Thank you.
meraki 1.46.0 + Python 3.12.2
dashboard = meraki.DashboardAPI(api_key=API_KEY_CN, base_url=base_url_CN, certificate_path=cert)
print(dashboard.organizations.getOrganizations())
>>> dashboard = meraki.DashboardAPI(API_KEY_CN, base_url_CN,cert)
2024-05-10 16:10:18 meraki: INFO > Meraki dashboard API session initialized with these parameters: {'version': '1.46.0', 'api_key': '************************************2dcc', 'base_url': 'https://api.meraki.cn/api/v1', 'single_request_timeout': 'c:\\temp\\meraki.com.crt', 'certificate_path': '', 'requests_proxy': '', 'wait_on_rate_limit': True, 'nginx_429_retry_wait_time': 60, 'action_batch_retry_wait_time': 60, 'network_delete_retry_wait_time': 240, 'retry_4xx_error': False, 'retry_4xx_error_wait_time': 60, 'maximum_retries': 2, 'simulate': False, 'be_geo_id': None, 'caller': None, 'use_iterator_for_get_pages': False}
>>> dashboard = meraki.DashboardAPI(api_key=API_KEY_CN, base_url=base_url_CN, certificate_path=cert)
2024-05-10 16:11:22 meraki: INFO > Meraki dashboard API session initialized with these parameters: {'version': '1.46.0', 'api_key': '************************************2dcc', 'base_url': 'https://api.meraki.cn/api/v1', 'single_request_timeout': 60, 'certificate_path': 'c:\\temp\\meraki.com.crt', 'requests_proxy': '', 'wait_on_rate_limit': True, 'nginx_429_retry_wait_time': 60, 'action_batch_retry_wait_time': 60, 'network_delete_retry_wait_time': 240, 'retry_4xx_error': False, 'retry_4xx_error_wait_time': 60, 'maximum_retries': 2, 'simulate': False, 'be_geo_id': None, 'caller': None, 'use_iterator_for_get_pages': False}
>>> print(dashboard.organizations.getOrganizations())
2024-05-10 16:11:57 meraki: INFO > GET https://api.meraki.cn/api/v1/organizations
2024-05-10 16:11:58 meraki: WARNING > organizations, getOrganizations - HTTPSConnectionPool(host='api.meraki.cn', port=443): Max retries exceeded with url: /api/v1/organizations (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))), retrying in 1 second
2024-05-10 16:11:59 meraki: INFO > GET https://api.meraki.cn/api/v1/organizations
2024-05-10 16:11:59 meraki: WARNING > organizations, getOrganizations - HTTPSConnectionPool(host='api.meraki.cn', port=443): Max retries exceeded with url: /api/v1/organizations (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))), retrying in 1 second
Traceback (most recent call last):
Have you checked it with the Meraki support?
That looks like a local issue with your Python install regarding SSL, Support won't assist here. A quick Google of the error took me here: https://stackoverflow.com/questions/52805115/certificate-verify-failed-unable-to-get-local-issuer-ce...
Most platforms offer Python built-in (or platform-supplied) trusted root certificates - so you don't usually need to specify " certificate_path=cert". Try taking it out and see if that resolves your issue.
Otherwise look at the "cert" variable to see where it is located, and copy that file from the old machine to the new machine.
Hello
This issue is on company PC which not have admin right. And the python is install by admin right, I am difficult change any settings.
Now I success build portable python and Eclipse on another company(also no admin right).
please just ignore this
Thanks for your time.