文档

常见问题

更新时间:

本文为您介绍MaxFrame的常见报错问题,帮助您能迅速识别并解决报错问题。

报错1:invalid type INT for function UDF definition, you need to set odps.sql.type.system.odps2=true; in order to use it

  • 报错原因:在未开启MaxCompute 2.0数据类型版本的情况下,使用MaxCompute 2.0的数据类型,导致作业执行时出现错误。

  • 解决方案:通过Flag开启MaxCompute 2.0数据类型,示例如下:

    from maxframe import config
    # 在new_session之前添加
    config.options.sql.settings = {
        "odps.sql.type.system.odps2": "true"
    }

报错2:UDF : No module named 'cloudpickle'

  • 报错原因:缺少依赖的cloudpickle包。

  • 解决方案:引用MaxCompute基础镜像,示例如下:

    from maxframe import config
    # 在new_session之前添加
    config.options.sql.settings = {
        "odps.session.image": "common",
    }