У меня есть следующий код python.Ошибка отступа в Python для соответствия внешнему уровню отступа
import subprocess, process_utility
class PhantomasProcessor:
def run_test(self, url):
"""
Method to run a test through Phantomas.
Args:
url for which you want to run the test.
Returns:
The json output for
"""
command = "phantomas " + url + "--har=test.har"
result = ProcessUtility.execute_command(command)
return result
def main():
phantomas_processor = PhantomasProcessor()
print phantomas_processor.run_test("www.amazon.com")
if __name__ == "__main__":
main()
После выполнения я получаю сообщение об ошибке.
IndentationError: unindent does not match any outer indentation level
.
Я сравнил внешний уровень отступа, но почему же я все еще продолжаю получать эту ошибку.
убедитесь, что вы не смесительные вкладки и пробелы. – Thedudxo
Это работает для меня. Это ваш полный код? –
У меня тоже есть основной класс. отредактировал код – station