Error in Linear Variational Solver

Note that the fenics tutorial was published in 2017, to be compatible with the 2016.2.0 version. To be able to help you, we need to know which version of FEniCS you are using.
For your particular issue, see for instance: Updating Fenics Vol 1 Demos