Home / Questions / Other AttributeError: 'NoneType' object has no attribute ... को कैसे debug करें? इस error को future में कैसे prevent करें? Other 0 Views Verified AttributeError: 'NoneType' object has no attribute ... को कैसे debug करें? इस error को future में कैसे prevent करें? #python #error #debugging #exception #solution Sarkari Result QA Bank Editorially reviewed exam information Share
Verified Correct Answer if obj is not None: obj.method() if obj is not None: obj.method() Additional Explanation None पर attribute/method access करने से पहले value check करें।
Verified obj.method() always without checking obj.method() always without checking Additional Explanation यह विकल्प सही समाधान नहीं है।
Verified obj = None.method() obj = None.method() Additional Explanation यह विकल्प सही समाधान नहीं है।