Dynamically change size of a docked window on

I have 2 docked windows, I wanna resize the 2nd window by pressing a button on my 1st window.
I can easily do this by scripting "setSize" method, however I run into an error when I wan't my script to be more dynamic.

So here is my script on my button (under 1st window):

try:
	leftBarMenu = system.gui.getWindow('Left Bar Menu')
	leftBarMenu_width = leftBarMenu.getSize().getWidth()
	leftBarMenu_height = leftBarMenu.getSize().getHeight()
	leftBarMenu.setSize(100,leftBarMenu_height)
	
except ValueError:
	print "Error"

I wanna expand my 2nd window's width into 100 value and retain the existing height.
However I have this error:

Which is I don't have any ideas why, anyone in the community experience the same?

Thanks and Regards.
Joe

Try to add print type(leftBarMenu_height) to your exception handling and see what type is your variable.

Hi, changing the code to this solved the problem.

try:
	leftBarMenu = system.gui.getWindow('Left Bar Menu')
	leftBarMenu_width = leftBarMenu.getSize().getWidth()
	leftBarMenu_height = leftBarMenu.getSize().getHeight()
	
	width = 500
	height = int(leftBarMenu_height)
	leftBarMenu.setSize(width,height)
	print leftBarMenu_width , ' ' , leftBarMenu_height
except ValueError:
	print "Error"

I think @pascal.fragnoud is right, by just simply converting the type of my variable "leftBarMenu_height" to int solved it.

Thanks and Regards