Hi,
in order to API query our meraki dashboard. I have installed the module meraki (pip install meraki)
[nagios@nvs-nagios-01 ~]$ python
Python 3.9.21 (main, Dec 5 2024, 00:00:00)
[GCC 11.5.0 20240719 (Red Hat 11.5.0-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import meraki
>>> dashboard = meraki.DashboardAPI(apikey)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'meraki' has no attribute 'DashboardAPI'
>>> dir(meraki)
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
As you can see above, i get "AttributeError: module 'meraki' has no attribute 'DashboardAPI'
My server in a Redhat9.5
any suggestion/help please
Thanks
AttributeError: module 'meraki' has no attribute 'DashboardAPI'
- jmichaelson
- Posts: 375
- Joined: Wed Aug 23, 2023 1:02 pm
Re: AttributeError: module 'meraki' has no attribute 'DashboardAPI'
Curious what version of the Meraki API pip is installed and what version of the API it ends up using. I found this https://community.meraki.com/t5/Develop ... m-p/216163 link, and following the link in the last post it is evident that there are multiple versions out there.
Please let us know if you have any other questions or concerns.
-Jason
-Jason
Re: AttributeError: module 'meraki' has no attribute 'DashboardAPI'
The installed meraki version:
[root@nvs-nagios-01: ~]# pip list|grep meraki
meraki 1.53.0
[root@nvs-nagios-01: ~]# pip list|grep meraki
meraki 1.53.0
- jmichaelson
- Posts: 375
- Joined: Wed Aug 23, 2023 1:02 pm
Re: AttributeError: module 'meraki' has no attribute 'DashboardAPI'
Just trying it myself, I'm unable to reproduce your problem:
Howver when I use a Cent9 system with python 3.9.21, i get the following:
You may need a newer version of python.
Code: Select all
Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import meraki
>>> dashboard = meraki.DashboardAPI("ABCD")
2025-02-26 19:10:27 meraki: INFO > Meraki dashboard API session initialized with these parameters: {'version': '1.54.0', 'api_key': '************************************ABCD', 'base_url': 'https://api.meraki.com/api/v1', 'single_request_timeout': 60, '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}
>>>
Code: Select all
Python 3.9.21 (main, Feb 10 2025, 00:00:00)
[GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import meraki
>>> dashboard = meraki.DashboardAPI("ABCD")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nagios/.local/lib/python3.9/site-packages/meraki/__init__.py", line 150, in __init__
self._session = RestSession(
File "/home/nagios/.local/lib/python3.9/site-packages/meraki/rest_session.py", line 103, in __init__
check_python_version()
File "/home/nagios/.local/lib/python3.9/site-packages/meraki/common.py", line 22, in check_python_version
raise PythonVersionError(message)
meraki.exceptions.PythonVersionError: This library requires Python 3.10 at minimum. Python versions 3.8 and below are EOL as of October 2024 or earlier. End of life Python versions no longer receive security updates since reaching end of life and of support per the Python maintainers. Your interpreter version is: 3.9.21. Please consult the readme at your convenience: https://github.com/meraki/dashboard-api-python Additional details: python_version_tuple()[0] = 3; python_version_tuple()[1] = 9
>>>
Please let us know if you have any other questions or concerns.
-Jason
-Jason