Answer the question
In order to leave comments, you need to log in
What is the correct way to avoid AttributeError: 'NoneType' object has no attribute 'strip' in python 2.7?
Hello.
in the python code for parsing html text, I use
everything works fine in the version of the interpreter 3.6, BUT if you switch to 2.7, then the error is reproduceddate_start_job=(data[y].get("Дата")).strip()
date_start_job=(data[y].get("Дата")).strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question