python - Python - for 循环语句中的错误(更新到 salesforce)
问题描述
我有两列的数据框,即 Id 和 datetimehelp (保存时间戳值)。
下面给出的是数据框中的数据视图(account_update_subset)
Id,datetimehelp
123,18/05/18 9:50
234,NaT
567,18/05/18 9:45
我正在编写以下 Python 代码以对 Salesforce 对象进行此更新,但它向我抛出错误响应内容:{'exceptionCode':'InvalidBatch','exceptionMessage':'Records not processed'}
if len(account_update_subset) > 0:
key_update_attributes_list = []
update_attributes_list = []
for i in range(len(account_update_subset)):
update_attributes_data = {'Id': account_update_subset['Id'].iloc[i],
'datetimehelp': account_update_subset['datetimehelp'].iloc[i]}
update_attributes_list.append(update_attributes_data)
sf_data_cursor.bulk.Account.update(update_attributes_list)
谁能帮我找出这个 Python 脚本哪里出错了。谢谢
解决方案
推荐阅读
- android - Android Studio 无法识别 NotificationCompat.Builder.setSilent(Boolean) 尽管该函数在文档中
- floating-point - 查明从十进制到二进制浮点的转换是否准确、向上舍入或向下舍入
- vba - 如何将绘图从 Visio 页面复制到 Word 文档
- sql - 在 SQL 中减去两个 COUNT 值
- javascript - 如何在jQuery中匹配类并在之后添加一个新类
- xamarin - Xamarin,如何为项目中的图像文件名生成常量?
- c# - 泛型方法和 NRT 返回类型 - 奇怪的编译器警告
- cmake - 如何通过 CMake 命令行注入符号
- prolog - 如何检查序言中列表的每3个连续项目
- java - 附加到文件的数字签名