Python script freezes on "show vlan" command
						
					
					
				
			
		
	
			
	
	
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎07-05-2019 01:38 PM
			
				
					
					
						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.
		
		
	
	
	
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
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎07-05-2019 09:30 PM
			
				
					
					
						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
		
		
	
	
	
#create vlan 100-1000
Created a 2 line script x.py
a = exsh.clicmd("show vlan", True)
print a
#run script x.py
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Get Direct Link
 - Report Inappropriate Content
 
‎07-05-2019 02:32 PM
			
				
					
					
						Maybe you should share your script, or a snippet enough to reproduce the problem, and the exact error message.