'NoneType' object is not subscriptable

This was answered here: