NoneType Error - Python Forum
https://python-forum.io/thread-2674.html02.04.2017 · NoneType is the type of the special None object. When you get "'NoneType' object has no attribute 'XXX'" it means you are trying to use the attribute XXX (or a method, since in Python, methods behave like callable attributes) of the None object, usually because one of your variables contains None and not what you think.