The tutorial is based on the 2016 release of dolfin. The api has changed since then, and should be u.vector().get_local()
There are several other references to the modern framework, see for instance: Is there an updated reference for beginners? - #2 by dokken
3 Likes