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

cannot import name 'clitable' from 'textfsm' #731

Closed
micahculpepper opened this issue May 26, 2020 · 0 comments · Fixed by #902
Closed

cannot import name 'clitable' from 'textfsm' #731

micahculpepper opened this issue May 26, 2020 · 0 comments · Fixed by #902

Comments

@micahculpepper
Copy link
Contributor

ISSUE TYPE
  • Documentation Report

Creating this issue for awareness in case folks run into the same problem. There's nothing to be fixed on the NTC end at this time.

SUMMARY

ntc-templates depends on textfsm, which hasn't published a source distribution to pypi in a while. See google/textfsm#65

This means that for users with a build chain that depends on source distributions only (i.e. no wheels), ntc-templates appears to have a bug:

File "/usr/local/Cellar/foo/version/libexec/lib/python3.7/site-packages/ntc_templates/parse.py", line 3, in <module>
    from textfsm import clitable
ImportError: cannot import name 'clitable' from 'textfsm' 

What's actually happening here is that textfsm provides a source distribution only up to version 0.4.1 (2018-04-09) but the ntc-templates code relies on the interface from version 1.1.0 (2019-07-24) which is only available as a wheel. So the way for users to fix this problem if they encounter it is to install textfsm 1.1.0.

STEPS TO REPRODUCE
(.venv)  test → pip install --no-binary :all: --no-deps ntc-templates textfsm future six
<output omitted>
Successfully installed future-0.18.2 ntc-templates-1.4.2 six-1.15.0 textfsm-0.4.1
(.venv)  test → python -c 'from ntc_templates import parse'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/micah/test/.venv/lib/python3.8/site-packages/ntc_templates/parse.py", line 3, in <module>
    from textfsm import clitable
ImportError: cannot import name 'clitable' from 'textfsm' (/Users/micah/test/.venv/lib/python3.8/site-packages/textfsm.py)
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 a pull request may close this issue.

1 participant