-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
netmiko import pysnmp error #3469
Comments
Okay...makes sense for 5+ years there were no updates to pysnmp and then in July 2024 they released a version 5 and a version 6. So what is needed.
In order to use the current released version of Netmiko, a user would need to install and use the older version of pysnmp (since it looks like they made a backwords incompatible change). |
I am working on a fix for this issue now. However, at the moment, I am experiencing some troubling exceptions when testing on Python 3.8 and 3.9 on Windows due to an issue with Python asyncio (python/cpython#92841). import sys
if sys.version_info[0] == 3 and sys.version_info[1] <= 9 and sys.platform == 'win32':
# patch for windows 3.8-3.9 python bug https://github.com/python/cpython/issues/92841
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) Any suggestions? |
My project is running in linux, I think I have encountered a very similar problem with you, it seems that the task has ended, but the asynico of asynchronous management mistakenly thinks that the task has not ended, unfortunately: I didn't know much about python's asyncism, so I asked GPT, and it suggested writing programs to cancel tasks, so I was wondering if it was possible to give tasks a name when adding tasks, and use code to cancel the corresponding tasks when a certain task already has a return value. I don't know if it's feasible, but I hope it can give you some inspiration. |
@Tonygratta Yeah, I wouldn't think fixing that is necessary from Netmiko's perspective. |
I guess the pysnmp error should be fixed with #3473. In the meantime pysnmp >7.x was released. Ilya, the original pysnmp author, sadly passed away. This might be the reason for the long (now short) release cycle. new pip releases are published from lextudio fork. |
Description of Issue/Question
I have netmiko4.4.0 and pysnmp6.2.4 installed, and when I run the project, I get an error: pysnmp not installed; please install it: 'pip install pysnmp'
The investigation found that:
The source code is like this package import:
from pysnmp.entity.rfc3413.oneliner import cmdgen
In pysnmp6.2.4, cmdgen has a cmdgen.py file in the path: pysnmp/entity/rfc3413
netmiko4.4.0 was released on July 9, 2024.
pysnmp> 5.* versions are all released after July 17, 2024.
If I use pysnmp earlier than 6.2.2, there is no problem, it appears that the pysnmp author changed the file structure in 6.2.2
Setup
Netmiko version
Netmiko device_type (if relevant to the issue)
(Paste
device_type
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue)
(Paste the code between the quotes below)
The text was updated successfully, but these errors were encountered: