cancel
Showing results for 
Search instead for 
Did you mean: 

Python script freezes on "show vlan" command

Python script freezes on "show vlan" command

johnwcalder
New Contributor
I am trying to get the output of "show vlan " so I can manipulate the data in a python script, yet my script stalls on the following line: exsh.clicmd("show vlan", True)

When I kill the script I get the following error: TypeError: 'NoneType' object is not callable

This error does not occur with other commands, like "show fdb vlan 1". I have tried "disable clipaging" since I thought it might be a problem with Python waiting for more data that isn't coming, but that didn't work.

Is there something I am missing, or is it possible that the output of "show vlan" is too large for Python to deal with? This switch has over 700 VLANs.
2 REPLIES 2

Dave_Hammers
Extreme Employee
I did the following but didn't have any issues using EXOS 21.1 or 30.2 on a X450G2-48p-10G4

#create vlan 100-1000

Created a 2 line script x.py

a = exsh.clicmd("show vlan", True)
print a

#run script x.py

Ludovico_Steven
Extreme Employee
Maybe you should share your script, or a snippet enough to reproduce the problem, and the exact error message.
GTM-P2G8KFN