开发者社区> 问答> 正文

MaxCompute中python udf报错

MaxCompute中python udf报错 IOError: Download resource: xxx.zip failed, Perhaps you forgot to add it to using list when create funciton odps.distcache.DistributedCacheError: Invalid relative path, file not exists fuxi job failed, caused by: Download resource failed: xxx.zip

展开
收起
亢海鹏 2021-08-23 10:39:42 13278 0
1 条回答
写回答
取消 提交回答
  • MaxCompute 是面向分析的企业级 SaaS 模式云数据仓库,以 Serverless 架构提供快速、全托管的在线数据仓库服务,消除了传统数据平台在资源扩展性和弹性方面的限制,最小化用户运维投入,使您可以经济并高效的分析处理海量数据。

    场景:Python UDF里使用get_cache_archive('xxx.zip')时报错

    排查步骤: 1、查看UDF函数信息(desc function your_udf_function;)确认输出的“Resources”里是否有xxx.zip

    2、查看资源信息(desc resource xxx.zip;)确认输出的“Type”是否是ARCHIVE 确认资源名字和实际文件格式一致。如果资源名字为xxx.zip,但实际上传的文件是xxx.tar.gz,此时会按zip格式解压,会解压失败报错。

    解决方法:上传xxx.zip为ARCHIVE类型资源,注册函数时资源列表里要加上xxx.zip get_cache_archive使用方法参考:https://help.aliyun.com/document_detail/154431.html?spm=a2c4g.11186623.6.762.83224ad9MVsxDW#title-zm6-9sv-yc2

    2021-08-23 10:40:34
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Data+AI时代大数据平台应该如何建设 立即下载
大数据AI一体化的解读 立即下载
极氪大数据 Serverless 应用实践 立即下载