lhllhx / PT_signin

Pt站点的自动签到和数据统计
https://blog.3628688.xyz/index.php/2022/07/25/利用阿里云实现pt自动签到和数据统计/
244 stars 114 forks source link

阿里云测试函数时报错 #16

Closed sushazhi closed 2 years ago

sushazhi commented 2 years ago

阿里云测试函数时报错,上传的是zip压缩包呀

{ "errorMessage": "File is not a zip file", "errorType": "BadZipFile", "stackTrace": [ [ "File \"/code/index.py\"", "line 40", "in handler", "zipFile = zipfile.ZipFile('/tmp/config.zip')" ], [ "File \"/var/fc/lang/python3.9/lib/python3.9/zipfile.py\"", "line 1257", "in init", "self._RealGetContents()" ], [ "File \"/var/fc/lang/python3.9/lib/python3.9/zipfile.py\"", "line 1324", "in _RealGetContents", "raise BadZipFile(\"File is not a zip file\")" ] ] }

lhllhx commented 2 years ago

两个可能 1 (可能性比较大)配置文件地址或者token填错了 导致下载下来的不是压缩文件而是github的报错 有条件的话可以尝试本地跑一次 看看下载下来的什么 2 压缩格式有问题 尝试更换压缩软件