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

Update utilities.py #3514

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Update utilities.py #3514

wants to merge 1 commit into from

Conversation

MrVicknair
Copy link

added a minor correction to the way arguments get passed to the pkg_resources.path() function

minor correction to the way arguments get passed to the pkg_resources.path() function
@ktbyers
Copy link
Owner

ktbyers commented Oct 23, 2024

Why make this change?

named arguments are generally safer than positional arguments--was there something specific that was breaking that necessitates this?

@MrVicknair
Copy link
Author

MrVicknair commented Oct 24, 2024

I received an error while attempting to use the named argument 'package' with importlib.resources.path()

This behavior may be reproduced with python 3.13 , netmiko 4.4.0, ntc_templates 7.3.0

TypeError: path() got an unexpected keyword argument 'package'

This behavior can be seen while setting textFSM=True, while NET_TEXTFSM environment is NOT set i.e:
output = net_connect.send_command('show version', use_textfsm=True)

@MrVicknair
Copy link
Author

@ktbyers - While the proposed change does fix the issue I encountered, this code will never be ran with properly set NET_TEXTFSM environment value pointing to the ntc_templates\templates directory.

@MrVicknair MrVicknair closed this Oct 24, 2024
@ktbyers
Copy link
Owner

ktbyers commented Oct 24, 2024

Okay, I am going to re-open this as I want to reproduce the issue/behavior. I am suspecting it is a Python 3.13 change (that I haven't tested/fixed yet).

@ktbyers ktbyers reopened this Oct 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants