-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
textfsm.parser.TextFSMError: State Error raised. Rule Line: 15. Input Line: show ip arp #686
Comments
This is most likely to the command being in the output. Do you mind providing the output and the relevant part of the script? I believe we have version 1.4.1 available as well if you want to try that, but not sure that will help. |
Would need output to continue, feel free to reopen ticket if you add that output to the issue. |
So the original output is the Error I had received which I provided. Value Required PROTOCOL (\S+) Start Capture time-stamp if vty line has command time-stamping turned on^Load\s+for\s+ What I did is removed very last line of this template. I have seen similar issues on the github with NTC templates and they had to remove or change last line. Value Required PROTOCOL (\S+) Start Capture time-stamp if vty line has command time-stamping turned on^Load\s+for\s+ Any particular reason why it errors out with that line? Here is the function that does all the job. def Run_show_Commands_TextFSM(connected_to):
|
@moderatelo Try changing |
@moderatelo The As @FragmentedPacket mentioned, and as the error shows ( |
@moderatelo I'm going to close this issue as @jmcgill298 has provided sufficient explanation of your issue. If you need further help, we're available on our public Slack in the #networktocode channel. |
I ran into similar issue here.
which appears to be related to "show ip arp" template on Cisco IOS platform
When I run it with text-FSM enabled i get this error
Traceback (most recent call last):
File "./doConfigs.py", line 200, in
Run_show_Commands_TextFSM(connectToSW)
File "./doConfigs.py", line 123, in Run_show_Commands_TextFSM
output = connected_to.send_command('show ip arp', delay_factor=1, max_loops=40, strip_prompt=False, strip_command=False,use_textfsm=True )
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko\utilities.py", line 347, in wrapper_decorator
return func(self, *args, **kwargs)
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko\base_connection.py", line 1447, in send_command
template=textfsm_template,
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko\utilities.py", line 280, in get_structured_data
return _textfsm_parse(textfsm_obj, raw_output, attrs)
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko\utilities.py", line 252, in _textfsm_parse
textfsm_obj.ParseCmd(raw_output, attrs)
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko_textfsm_clitable.py", line 272, in ParseCmd
self.table = self._ParseCmdItem(self.raw, template_file=template_files[0])
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\netmiko_textfsm_clitable.py", line 303, in _ParseCmdItem
for record in fsm.ParseText(cmd_input):
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\textfsm\parser.py", line 895, in ParseText
self._CheckLine(line)
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\textfsm\parser.py", line 944, in _CheckLine
if self._Operations(rule, line):
File "C:\Users\skononets\AppData\Local\Programs\Python\Python37-32\lib\site-packages\textfsm\parser.py", line 1025, in _Operations
% (rule.line_num, line))
textfsm.parser.TextFSMError: State Error raised. Rule Line: 15. Input Line: show ip arp
When i run it without text-FSM parsing then it works fine.
My modules are mostly up to date and I dont have those issues with other template commands
C:\Users\xxxxxxxxxx>pip list textfsm
Package Version
asn1crypto 0.24.0
bcrypt 3.1.7
cffi 1.12.3
ciscoconfparse 1.5.1
colorama 0.4.3
cryptography 2.7
dnspython 1.16.0
future 0.17.1
netmiko 3.1.0
ntc-templates 1.4.0
paramiko 2.6.0
passlib 1.7.2
pip 20.0.2
pycparser 2.19
PyNaCl 1.3.0
pyserial 3.4
scp 0.13.2
setuptools 40.8.0
six 1.12.0
terminal 0.4.0
textfsm 1.1.0
any help would be appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: