rhming / UnicomDailyTask

联通日常任务 腾讯云函数定时执行
MIT License
152 stars 77 forks source link

运行报RuntimeUnavailableError错误 #15

Closed jsk188 closed 3 years ago

jsk188 commented 3 years ago

日志如下 2021/10/29 15:45:03 GMT+08:00 07f8bfa4-3ea9-4291-84f5-6aec7af3ef46 Function invocation catch a 'RuntimeUnavailableError' exception(Could not find an available JavaScript runtime.) Traceback (most recent call last): File "./index.py", line 118, in main_handler Template(SigninApp) File "./index.py", line 38, in Template ts.append(Thread(target=cls(mobile, password).run)) File "./activity/unicom/dailySign.py", line 16, in init super(SigninApp, self).init(mobile, password) File "./utils/unicomLogin.py", line 32, in init self.login() File "./utils/unicomLogin.py", line 90, in login "mobile": self.JSEncrypt(self.mobile), File "./utils/unicomLogin.py", line 70, in JSEncrypt ctx = execjs.compile(js) File "./execjs/init.py", line 61, in compile return get().compile(source, cwd) File "./execjs/_runtimes.py", line 21, in get return get_from_environment() or _find_available_runtime() File "./execjs/_runtimes.py", line 49, in _find_available_runtime raise exceptions.RuntimeUnavailableError("Could not find an available JavaScript runtime.") execjs._exceptions.RuntimeUnavailableError: Could not find an available JavaScript runtime.

rhming commented 3 years ago

是在华为云函数工作流上部署的吗 华为云函数工作流需要单独添加python依赖包 华为云函数工作流默认环境变量中没有node,需要修改依赖包中的代码,我提供的已经修改过了

jsk188 commented 3 years ago

是华为云,添加了依赖包,我重新添加试试

jsk188 commented 3 years ago

之前上传错代码包了,打扰大佬了