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.

Incomplete import of textfsm

See original GitHub issue

I’m trying to package Netmiko 2.0.1 for Fedora, and run into the following issue when importing the package in buildroot:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "netmiko/__init__.py", line 8, in <module>
    from netmiko.ssh_dispatcher import ConnectHandler
  File "netmiko/ssh_dispatcher.py", line 4, in <module>
    from netmiko.a10 import A10SSH
  File "netmiko/a10/__init__.py", line 2, in <module>
    from netmiko.a10.a10_ssh import A10SSH
  File "netmiko/a10/a10_ssh.py", line 4, in <module>
    from netmiko.cisco_base_connection import CiscoSSHConnection
  File "netmiko/cisco_base_connection.py", line 3, in <module>
    from netmiko.base_connection import BaseConnection
  File "netmiko/base_connection.py", line 24, in <module>
    from netmiko.utilities import write_bytes, check_serial_port, get_structured_data
  File "netmiko/utilities.py", line 9, in <module>
    from netmiko._textfsm import _clitable as clitable
  File "netmiko/_textfsm/__init__.py", line 3, in <module>
    from netmiko._textfsm import _clitable
  File "netmiko/_textfsm/_clitable.py", line 34, in <module>
    import copyable_regex_object

Apparently, the imported code still imports “textfsm” and “copyable_regex_object”. So it seems that it’s still required to install textfsm, which, as far as I get gather, is problematic on Windows (and is not packaged for Fedora).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dtantsurcommented, Jan 8, 2018

@ktbyers both options look good to me, so it’s up to you what you think fits the project better.

0reactions
ktbyerscommented, Apr 26, 2019

I am going to close this as I don’t think there are any remaining actions here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Examples of TextFSM usage - Python for network engineers
import sys import textfsm from tabulate import tabulate template ... then hops of incomplete route entries are collected in the list (other ...
Read more >
ntc-templates 1.5.0 - PyPI
This project provides a large collection of TextFSM Templates (text parsers) for a variety of Networking Vendors. In addition to the templates, ...
Read more >
Nornir (Python Network Automation) | TextFSM & Structured ...
In this video we look at leveraging the power of TextFSM to obtain granular control of our automation scripts!
Read more >
How to use the textfsm.TextFSM function in textfsm - Snyk
To help you get started, we've selected a few textfsm. ... def _parse_acl_with_textfsm(self, parser_file, output): import textfsm tmp = open(parser_file) ...
Read more >
Question with Netmiko and TextFSM against cisco IOSXE
You have many options here. I will try to name some: Move for loop into a function. def check_complaint(output): for i in output:...
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