Lixiaolin 发表于 2020-11-13 09:59:19

run以后出现这个,咋弄?大佬救命

File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)# execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Administrator/Desktop/spider/spider_maoyan_v2.py", line 77
    if __name__ =="__main__":
                            ^
SyntaxError: invalid syntax

昨非 发表于 2020-11-13 10:01:04

看一下if __name__ =="__main__":前面有没有多余空格啥的,造成了语法错误

Twilight6 发表于 2020-11-13 10:48:56



建议完整点的代码发上来看看~

nahongyan1997 发表于 2020-11-13 10:49:22

请发代码
页: [1]
查看完整版本: run以后出现这个,咋弄?大佬救命