Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

云函数运行报错 #28

Closed
123321abccba1 opened this issue Jan 23, 2022 · 13 comments
Closed

云函数运行报错 #28

123321abccba1 opened this issue Jan 23, 2022 · 13 comments
Labels
缺少依赖 云函数: 没绑定层或上传的依赖文件不对 | 其他: 没安装依赖

Comments

@123321abccba1
Copy link

START RequestId: c78ca8ea14a3677c71692407657bace3

Init Report RequestId: c78ca8ea14a3677c71692407657bace3 Coldstart: 838ms (PullCode: 113ms InitRuntime: 11ms InitFunction: 714ms) Memory: 128MB MemUsage: 16.73MB

ERROR RequestId: c78ca8ea14a3677c71692407657bace3 Result: {"errorCode": -1, "errorMessage": "Traceback (most recent call last): File "/var/runtime/python3/bootstrap.py", line 133, in init_handler func_handler = get_func_handler(file.rsplit(".", 1)[0], func) File "/var/runtime/python3/bootstrap.py", line 159, in get_func_handler mod = imp.load_module(mname, *imp.find_module(mname)) File "/var/lang/python3/lib/python3.6/imp.py", line 234, in load_module return load_source(name, filename, file) File "/var/lang/python3/lib/python3.6/imp.py", line 172, in load_source module = _load(spec) File "", line 675, in _load File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/var/user/index.py", line 6, in import json5 ModuleNotFoundError: No module named 'json5'", "statusCode": 443}

END RequestId: c78ca8ea14a3677c71692407657bace3

Report RequestId: c78ca8ea14a3677c71692407657bace3 Duration: 0ms Memory: 128MB MemUsage: 16.73MB

START RequestId:c78ca8ea14a3677c71692407657bace3

ERROR RequestId:c78ca8ea14a3677c71692407657bace3 Result:{"errorCode":-1,"errorMessage":"Traceback (most recent call last):\n File "/var/runtime/python3/bootstrap.py", line 133, in init_handler\n func_handler = get_func_handler(file.rsplit(".", 1)[0], func)\n File "/var/runtime/python3/bootstrap.py", line 159, in get_func_handler\n mod = imp.load_module(mname, *imp.find_module(mname))\n File "/var/lang/python3/lib/python3.6/imp.py", line 234, in load_module\n return load_source(name, filename, file)\n File "/var/lang/python3/lib/python3.6/imp.py", line 172, in load_source\n module = _load(spec)\n File "\u003cfrozen importlib._bootstrap\u003e", line 675, in _load\n File "\u003cfrozen importlib._bootstrap\u003e", line 655, in _load_unlocked\n File "\u003cfrozen importlib._bootstrap_external\u003e", line 678, in exec_module\n File "\u003cfrozen importlib._bootstrap\u003e", line 205, in _call_with_frames_removed\n File "/var/user/index.py", line 6, in \u003cmodule\u003e\n import json5\nModuleNotFoundError: No module named 'json5'","statusCode":443}

END RequestId:c78ca8ea14a3677c71692407657bace3

Report RequestId:c78ca8ea14a3677c71692407657bace3 Duration:0ms Memory:128MB MemUsage:0.000000MB

@chen310
Copy link
Owner

chen310 commented Jan 23, 2022

添加依赖

@clownwait
Copy link

添加
不好意思,没仔细阅读文档,感谢解答!问题已经解决

@chen310 chen310 pinned this issue Feb 17, 2022
@chen310 chen310 closed this as completed Feb 17, 2022
This was referenced Mar 16, 2022
@Timothy-att
Copy link

我也出错aaa,这是怎么回事

@chen310
Copy link
Owner

chen310 commented Mar 18, 2022

我也出错aaa,这是怎么回事

上面已经回复了,需要依赖,添加层

@Timothy-att
Copy link

添加了,还是不行

@123321abccba1
Copy link
Author

我添加依赖后正常了

@chen310
Copy link
Owner

chen310 commented Mar 18, 2022

添加了,还是不行

可能时文件上传错了,仔细看一下你上传的是哪个文件

@Timothy-att
Copy link

@chen310 我再试一遍

@Timothy-att
Copy link

怎么还是会报错

@chen310
Copy link
Owner

chen310 commented Mar 18, 2022

@Timothy-att 你下载的是这个文件吗 https://chen10.lanzouo.com/igHXzxf8wjc

@Timothy-att
Copy link

依赖文件是dependencies吗?

@Timothy-att
Copy link

@Timothy-att
Copy link

@chen310 我找到原因了,我叉的不是你的项目

@chen310 chen310 added the 缺少依赖 云函数: 没绑定层或上传的依赖文件不对 | 其他: 没安装依赖 label Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
缺少依赖 云函数: 没绑定层或上传的依赖文件不对 | 其他: 没安装依赖
Projects
None yet
Development

No branches or pull requests

4 participants