The problems you have originate from the last bits of your code:
Code:
def changeScene(scene):
viz.MainWindow.setScene(scene)
if scene == viz.Scene2:
viz.MainView.setPosition([0,1.8,0])
viz.MainView.setEuler([90,0,0])
manager.onEnter(None, changeScene)
In the last line, you tell Vizard to call the function changeScene() whenever the sensor is entered. The argument that gets passed to that function by default is the sensor that was activated. So your variable <scene> will be a proximity sensor => this will create an error when trying to change the scene to a sensor.
To fix this, you need to pass more arguments to the function changeScene, e.g.:
Code:
def changeScene(sensor,scene):
viz.MainWindow.setScene(scene)
if scene == viz.Scene2:
viz.MainView.setPosition([0,1.8,0])
viz.MainView.setEuler([90,0,0])
manager.onEnter(None, changeScene, desiredScene)
in which <desiredScene> is the variable to the scene you wish to change to.