IndentationError: unexpected indent error

后端 未结 6 1836
太阳男子
太阳男子 2020-12-10 01:49

I am new to Python and am getting this error:

Traceback (most recent call last):
  File \"/usr/local/bin/scrapy\", line 4, in 
    execute()
           


        
6条回答
  •  忘掉有多难
    2020-12-10 01:58

    As the error says you have not correctly indented code, check_exists_sql is not aligned with line above it cursor = db.cursor() .

    Also use 4 spaces for indentation.

    Read this http://diveintopython.net/getting_to_know_python/indenting_code.html

提交回复
热议问题