It seems that you are using a version of SageMath built with Python3. Alas, Python3 SageMath is not fully ready yet (see this question for a status update, and in particular the ticket #26212). In particular, the threejs viewer is not Python3 ready.