cannot import name 'clitable' from 'textfsm'
micahculpepper opened this issue · 0 comments
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)