-
Notifications
You must be signed in to change notification settings - Fork 21
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
云函数写入问题 #5
Comments
是的,我看了一下文档。云函数不支持编写状态相关的代码,所以禁止文件读写操作。可以考虑接入云数据库,但有点大材小用了,而且云数据库不是免费的。回头再看看有什么其它解决方案 |
是的,目前好一些的方法就是在Github上使用Action进行部署
…------------------ 原始邮件 ------------------
发件人: "zimin9/WoZaiXiaoYuanPuncher" ***@***.***>;
发送时间: 2021年8月8日(星期天) 下午4:04
***@***.***>;
***@***.******@***.***>;
主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 云函数写入问题 (#5)
是的,我看了一下文档。云函数不支持编写状态相关的代码,所以禁止文件读写操作。可以考虑接入云数据库,但是这个不是免费的。回头再看看有什么其它解决方案
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
可以使用 leancloud 的云存储服务 我摸索一下 |
utils.processJson("config.json").write(configs)
登录可以成功,但是这段代码在云函数里似乎有些问题,应该在云函数里是无法进行写入的!
执行结果:
`{
"errorCode": -1,
"errorMessage": "user code exception caught",
"requestId": "0935b0f9-7997-47fd-b77f-accd044692b0",
"stackTrace": "Traceback (most recent call last):\n File "/var/user/index.py", line 206, in main_handler\n loginStatus = wzxy.login()\n File "/var/user/index.py", line 45, in login\n self.setJwsession(jwsession)\n File "/var/user/index.py", line 63, in setJwsession\n utils.processJson("config.json").write(configs)\n File "/var/user/utils.py", line 36, in write\n with open(self.path,'w',encoding='utf-8') as file:\nOSError: [Errno 30] Read-only file system: 'config.json'",
"statusCode": 430
}
执行日志:
登陆成功`The text was updated successfully, but these errors were encountered: