Closed ericdost closed 1 year ago
I believe the finally clause in pyntc is masking an exception in establishing the scp connection and transferring the file. The netmiko code does not create a scp_conn
attribute on initialization, but is created during a call to the establish_scp_conn
method. I am guessing that there is failure before this, and so when the finally clause tries to close the connection, another exception is raised since the scp_conn
attribute hasn't been created.
Can you install pyntc from: https://github.com/networktocode/pyntc/tree/file_transfer
and try again? I don't think this will resolve the issue, but I think it will highlight the actual issue with transferring the file (likely the call to enabling scp on the device).
closing. Please retest now that #268 is deployed and 1.0.0 of this collection is in ansible-galaxy now.
I'm getting the the following error when trying to use
ntc_file_copy
:msg: '''CiscoIosFileTransfer'' object has no attribute ''scp_conn'''
Here is my current simple playbook:
Here is the output when I use provider:
When I don't use provider, I get the same error message: