Python AttributeError: 'NoneType' object has no attribute 'string' - Troubleshooting Guide
This error occurs when you try to access the 'string' attribute of a variable that is None (i.e. it has no value).
For example, if you have a variable called 'my_string' that is supposed to contain a string, but it is not assigned a value or set to None, trying to access its 'string' attribute will result in this error.
To fix this error, make sure that the variable you are trying to access has a value assigned to it before accessing its attributes.
原文地址: https://www.cveoy.top/t/topic/oA4v 著作权归作者所有。请勿转载和采集!