sage: s = polygen(QQ,'s')

This means using polygen instead of var. You also have to choose a coefficient field.