首页 > 解决方案 > 使用 boto3 更新 Dynamodb 表中的表数据时出错

问题描述

我正在尝试使用 boto3 更新到发电机数据库表。更新时出现以下错误。

TypeError:无法解压不可迭代的 NoneType 对象。

table = dynamodb.Table('user_data')
    response = table.update_item(
        Key={
            'userName': userName
        },
        UpdateExpression='SET userPass  = :val1',
        ExpressionAttributeValues={
            ':val1': make_password(newPasswd)
        }
    )

标签: amazon-dynamodbboto3

解决方案


推荐阅读