question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Netmiko 2.4.2 failing for TextFSM

See original GitHub issue

One of our servers was patched recently I am guessing and it appears to have broken Netmiko. We are running version 2.4.2 of Netmiko and 1.1.0 for TextFSM. Everything I can find says this issue was fixed in 2.4.1 but that doesn’t seem to be the case here. The server is running RHEL 7.7.

Traceback (most recent call last):
  File "/usr/bin/netmiko-show", line 18, in <module>
    from netmiko import ConnectHandler
  File "/usr/lib/python2.7/site-packages/netmiko/__init__.py", line 8, in <module>
    from netmiko.ssh_dispatcher import ConnectHandler
  File "/usr/lib/python2.7/site-packages/netmiko/ssh_dispatcher.py", line 4, in <module>
    from netmiko.a10 import A10SSH
  File "/usr/lib/python2.7/site-packages/netmiko/a10/__init__.py", line 2, in <module>
    from netmiko.a10.a10_ssh import A10SSH
  File "/usr/lib/python2.7/site-packages/netmiko/a10/a10_ssh.py", line 4, in <module>
    from netmiko.cisco_base_connection import CiscoSSHConnection
  File "/usr/lib/python2.7/site-packages/netmiko/cisco_base_connection.py", line 3, in <module>
    from netmiko.base_connection import BaseConnection
  File "/usr/lib/python2.7/site-packages/netmiko/base_connection.py", line 32, in <module>
    from netmiko.utilities import (
  File "/usr/lib/python2.7/site-packages/netmiko/utilities.py", line 11, in <module>
    from netmiko._textfsm import _clitable as clitable
  File "/usr/lib/python2.7/site-packages/netmiko/_textfsm/__init__.py", line 3, in <module>
    from netmiko._textfsm import _clitable
  File "/usr/lib/python2.7/site-packages/netmiko/_textfsm/_clitable.py", line 40, in <module>
    import copyable_regex_object
ImportError: No module named copyable_regex_object

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pkeysercommented, Nov 12, 2019

Seems to be solved now. I uninstalled textfsm via pip but there were still a couple of files left behind on the /usr/lib/python2.7/site-packages/textfsm/ directory.

ls -l /usr/lib/python2.7/site-packages/textfsm/
total 80K
drwxr-xr-x.   2 root root  43 Nov 12 16:56 .
drwxr-xr-x. 177 root root 12K Nov 12 16:56 ..
-rw-r--r--.   1 root root 31K Apr 15  2015 textfsm.py
-rw-r--r--.   1 root root 32K Jan 23  2019 textfsm.pyc

Once I deleted those and the directory and installed textfsm again everything seems to be working as expected. Thanks for the help.

1reaction
pkeysercommented, Nov 12, 2019

Yeah it is weird because all of those files exist. I will see what I can find out.

ls /usr/lib/python2.7/site-packages/textfsm/
clitable.py                copyable_regex_object.py   __init__.py                parser.py                  terminal.py                textfsm.py                 texttable.py
clitable.pyc               copyable_regex_object.pyc  __init__.pyc               parser.pyc                 terminal.pyc               textfsm.pyc                texttable.pyc
Read more comments on GitHub >

github_iconTop Results From Across the Web

Netmiko with textfsm 1.1.0 is not working. · Issue #1304 - GitHub
This is happening post textfsm update from 0.4.1 to 1.1.0. (temp_virt) vsethuram-a01:temp vsethuram$ pip3 install netmiko Collecting netmiko ...
Read more >
Solved: Import Netmiko to Pycharm fails - Experts Exchange
Import Netmiko to Pycharm fails. I have installed Netmiko as shown below: C:\Users\user>pip show netmiko Name: netmiko Version: 2.4.2 ...
Read more >
Netmiko installation error for python3 in gns3 - Stack Overflow
DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1. During handling of the above exception, another exception ...
Read more >
Netmiko and TextFSM - Python for Network Engineers
Now what about the failure case? In other words, what happens when the template lookup fails or ntc-templates is not installed properly. In...
Read more >
netmiko - PyPI
Netmiko aims to accomplish both of these operations and to do it across a very ... ran black against the code or your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found