Python Document Object Is Not Subscriptable