build.py中的语法无效

时间:2017-12-05 06:50:59

标签: python amazon-web-services amazon-rekognition

我尝试使用此构建应用程序 - https://github.com/awslabs/amazon-rekognition-video-analyzer/ 不幸的是,我在build.py文件中收到了syntaxerror。

def write_dir_to_zip(src, zf):
'''Write a directory tree to an open ZipFile object.'''
abs_src = os.path.abspath(src)
for dirname, subdirs, files in os.walk(src):
    for filename in files:
        absname = os.path.abspath(os.path.join(dirname, filename))
        arcname = absname[len(abs_src) + 1:]
        print 'zipping %s as %s' % (os.path.join(dirname, filename),
                                    arcname)
        zf.write(absname, arcname)

我得到的错误如下

 File "build.py", line 26
 arcname)) zf.write(absname, arcname)
          ^
 SyntaxError: invalid syntax

提前致谢!

0 个答案:

没有答案