-
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
utilities.get_template_dir() unexpected keyword argument 'package' #3527
Comments
Just realized there's an open issue for packages support open, is this related? |
@dakotah-hurda This should already be fixed in the I need to do a release to pypi with Netmiko support for PY3.13, now that PY3.13 has been released. |
Yes, same underling issue as #3520. |
Awesome, thanks for the quick response, you rock! 🤘 Will temporarily downgrade to 3.12.x until the new release is out. Thanks! |
A workaround for this issue is to specify the from netmiko import ConnectHandler
...
conn = ConnectHandler(**device)
facts = conn.send_command(
"show version",
use_textfsm=True,
textfsm_template="C:\\Path\\to\\Project\\.venv\\Lib\\site-packages\\ntc_templates\\templates\\cisco_ios_show_version.textfsm",
)
conn.disconnect()
print(facts)
... |
Description of Issue/Question
I am running a simple SSH script with Netmiko v4.4.0 on Python 3.13.0. The issue only appears when using the 'use_textfsm=True' argument in the send_command() function.
It appears the function ultimately calls the netmiko.utilities.get_template_dir() function on line 298.
On line this code section, two arguments are passed into the function: 'package' and 'resource':
netmiko/netmiko/utilities.py
Lines 322 to 330 in fe00998
The traceback I'm experiencing indicates the pkg_resources.path() function being called does not expect those two arguments.
Setup
Netmiko version
Netmiko device_type (if relevant to the issue)
Steps to Reproduce the Issue
python -m venv dirname
(python 3.13.0)pip install netmiko
Error Traceback
Relevant Python code
The text was updated successfully, but these errors were encountered: