ktbyers / pynet

Python for Network Engineers
Apache License 2.0
585 stars 514 forks source link

Image Not Getting Copied for Arista 7010T switches! #32

Open sindhujit1 opened 3 years ago

sindhujit1 commented 3 years ago

Hi Kirk,

When i use the netmiko_file_transfer module, I am getting the following error:

OSError: Search pattern never detected in send_command_expect: [\$#]

Nornir Code:

nr_arista = nr.filter(F(hostname__in=device_urlArray))
nornir_set_creds(nr_arista ,fabricList,device_urlArray)
source_file = project_path + "/media/" + BinFile
result = nr_arista.run(
task=netmiko_file_transfer,
source_file=source_file,
dest_file=BinFile,
direction='put',
num_workers=len(NodeSwitch_tmp),
)
ktbyers commented 3 years ago

I need the full stack trace.

Also really should re-submit this issue against the nornir_netmiko repository and not here.

Regards, Kirk

4EverLuna commented 3 years ago

Please unsubscribe me fro this email thread. Thank you

Best,

Walter Luna

On Mar 18, 2021, at 5:57 PM, Kirk Byers @.***> wrote:



I need the full stack trace.

Also really should re-submit this issue against the nornir_netmiko repository and not here.

Regards, Kirk

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ktbyers/pynet/issues/32#issuecomment-802426664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACHMPGMKTTTNBOKWX4VDIBDTEKOP5ANCNFSM4ZNSS6PQ.

ktbyers commented 3 years ago

@Ziggy23810 I have no idea how you are subscribed to these messages. You will need to look into your GitHub notification settings.

Regards, Kirk

sindhujit1 commented 3 years ago

Here you go :

2021-03-18 15:49:43,938: WARNING/ForkPoolWorker-7] Traceback (most recent call last):
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/nornir/core/task.py", line 67, in start
    r = self.task(self, **self.params)
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/nornir/plugins/tasks/networking/netmiko_file_transfer.py", line 28, in netmiko_file_transfer
    net_connect, source_file=source_file, dest_file=dest_file, **kwargs
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/scp_functions.py", line 78, in file_transfer
    if scp_transfer.check_file_exists():
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/arista/arista.py", line 82, in check_file_exists
    return self._check_file_exists_unix(remote_cmd=remote_cmd)
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/scp_handler.py", line 188, in _check_file_exists_unix
    self.ssh_ctl_chan._enter_shell()
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/arista/arista.py", line 39, in _enter_shell
    return self.send_command("bash", expect_string=r"[\$#]")
  File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/base_connection.py", line 1337, in send_command
    search_pattern
OSError: Search pattern never detected in send_command_expect: [\$#]