您的位置: 首页 > 文章 > PyCharm(Python3)报错 PEP 8: expected 2 blank lines, found 1 PyCharm(Python3)报错 PEP 8: expected 2 blank lines, found 1 分类: 文章 • 2022-10-29 00:11:13 问题描述 相信不少初学者在使用PyCharm写函数的时候,可能会遇到这样的问题: 第11行代码处,on_draw()函数报错,错误显示为:PEP 8: expected 2 blank lines, found 1 意思为:需要两个空行,找到了一个。 解决方案 在写函数之前,先空两行。 修改之后,一切正常。