Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求云函数部署具体教程,两种方法部署后运行都报错。 #31

Open
YvoIovY opened this issue Aug 20, 2021 · 15 comments
Open

Comments

@YvoIovY
Copy link

YvoIovY commented Aug 20, 2021

No description provided.

@YvoIovY YvoIovY changed the title 求云函数吧7部署具体教程,两种方法部署后运行都报错。 求云函数部署具体教程,两种方法部署后运行都报错。 Aug 20, 2021
@srcrs
Copy link
Owner

srcrs commented Aug 20, 2021

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

@Mutx163
Copy link

Mutx163 commented Aug 20, 2021

START RequestId:d29a6d03-cd8b-4a56-9b94-1df0f267c6c7
Traceback (most recent call last):
users = json.load(fp)
File "/var/user/index.py", line 245, in readJson
File "/var/lang/python3/lib/python3.6/json/init.py", line 299, in load
File "/var/lang/python3/lib/python3.6/json/decoder.py", line 339, in decode
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/var/lang/python3/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
obj, end = self.scan_once(s, idx)
File "/var/lang/python3/lib/python3.6/json/decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Invalid control character at: line 5 column 179 (char 251)

账号信息获取失败错误,原因为: Invalid control character at: line 5 column 179 (char 251)
[2021-08-20 17:53:56,152]:ERROR:账号信息获取失败错误,原因为: Invalid control character at: line 5 column 179 (char 251)
1.请检查是否在Secrets添加了账号信息,以及添加的位置是否正确。
[2021-08-20 17:53:56,153]:ERROR:1.请检查是否在Secrets添加了账号信息,以及添加的位置是否正确。
2.填写之前,是否在网站验证过Json格式的正确性。
[2021-08-20 17:53:56,153]:ERROR:2.填写之前,是否在网站验证过Json格式的正确性。
ERROR RequestId:d29a6d03-cd8b-4a56-9b94-1df0f267c6c7 Result:{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Traceback (most recent call last):\n File "/var/user/index.py", line 426, in main_handler\n for user in users:\nTypeError: 'NoneType' object is not iterable","statusCode":430}
END RequestId:d29a6d03-cd8b-4a56-9b94-1df0f267c6c7
Report RequestId:d29a6d03-cd8b-4a56-9b94-1df0f267c6c7 Duration:2ms Memory:128MB MemUsage:31.242188MB

@Mutx163
Copy link

Mutx163 commented Aug 20, 2021

上面发的是腾讯云函数的报错

@YvoIovY
Copy link
Author

YvoIovY commented Aug 21, 2021

压缩包部署后报错和上面一样。

@YvoIovY
Copy link
Author

YvoIovY commented Aug 21, 2021

下面的是yml方式部署后,运行报错内容。

@YvoIovY
Copy link
Author

YvoIovY commented Aug 21, 2021

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦大佬看一下

@YvoIovY
Copy link
Author

YvoIovY commented Aug 21, 2021

日志:

START RequestId:ef15cbd7-36ba-4a6f-b0ab-f5d8c25652d4
ERROR RequestId:ef15cbd7-36ba-4a6f-b0ab-f5d8c25652d4 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 1, in \u003cmodule\u003e\n import requests,json,time,re,login,logging,traceback,os,random,notify,datetime,util\n File "/var/user/login.py", line 6, in \u003cmodule\u003e\n import base64,rsa,time,requests,logging,traceback,os\nModuleNotFoundError: No module named 'rsa'","statusCode":443}
END RequestId:ef15cbd7-36ba-4a6f-b0ab-f5d8c25652d4
Report RequestId:ef15cbd7-36ba-4a6f-b0ab-f5d8c25652d4 Duration:0ms Memory:128MB MemUsage:0.000000MB

@Saxon-Sun
Copy link
Contributor

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦构建的时候把cron启动一下 不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

@Dellear
Copy link
Contributor

Dellear commented Aug 22, 2021

不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

可以使用这个镜像 dellear/unicom-task

@Saxon-Sun
Copy link
Contributor

不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

可以使用这个镜像 dellear/unicom-task

我自己重新打包镜像了 也能用啦

@Mutx163
Copy link

Mutx163 commented Aug 22, 2021

不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

可以使用这个镜像 dellear/unicom-task

大佬,这个镜像可以在腾讯云函数上搭建吗

@YvoIovY
Copy link
Author

YvoIovY commented Aug 23, 2021

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦构建的时候把cron启动一下 不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

你不会自己开issue么?

@Saxon-Sun
Copy link
Contributor

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦构建的时候把cron启动一下 不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

你不会自己开issue么?

开一个issue和回复有区别吗 别搞笑

@YvoIovY
Copy link
Author

YvoIovY commented Aug 23, 2021

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦构建的时候把cron启动一下 不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

你不会自己开issue么?

开一个issue和回复有区别吗 别搞笑

也对,乞丐到哪都能要饭。

@Saxon-Sun
Copy link
Contributor

给一下,报错信息看看,云函数还没有更新,估计会有问题,docker报错信息我看看

麻烦构建的时候把cron启动一下 不然重启容器cron又不启动了 我现在的解决方案是用Dockerfile把images重新打包加上cron启动

你不会自己开issue么?

开一个issue和回复有区别吗 别搞笑

也对,乞丐到哪都能要饭。

笑死我了 我看每个issue你都要要饭 你对这个项目贡献什么了 ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants