添加tx云函数python3.6没有模块
各位大佬,小白求助一个问题,在本地pycharm上可以执行,无异常,
复制到tx云函数上显示:ModuleNotFoundError: No module named 'borax'
不知道tx云函数里面怎么导入这个模块
本地pycharm执行效果见下图:
tx云函数测试日志如下:
Traceback (most recent call last):
File "/var/runtime/python3/bootstrap.py", line 133, in init_handler
func_handler = get_func_handler(file.rsplit(".", 1), 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 "<frozen importlib._bootstrap>", line 675, in _load
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/var/user/index.py", line 4, in <module>
from borax.calendars.lunardate import LunarDate
ModuleNotFoundError: No module named 'borax'
希望大佬能帮忙看看原因 来,给你个官方文档https://cloud.tencent.com/document/product/583/9702 1047861073 发表于 2020-12-1 11:38
来,给你个官方文档https://cloud.tencent.com/document/product/583/9702
好的,大佬 添加层将需要的模块打包,上传到层,然后在函数中添加层 https://cloud.tencent.com/document/product/583/40159
看这个文档,一楼是错的 青山绿水meng 发表于 2020-12-1 14:48
https://cloud.tencent.com/document/product/583/40159
看这个文档,一楼是错的
感谢大佬
页:
[1]