python-3.x - 使用 google docs API 添加制表位的正确方法是什么
问题描述
我尝试了以下方法:
{'updateParagraphStyle': {
'paragraphStyle': {
'namedStyleType': "NORMAL_TEXT",
'alignment': "END",
'direction': "LEFT_TO_RIGHT",
'borderBottom': {
'width': {'magnitude': 1.5, 'unit': "PT"},
'padding': {'magnitude': 1, 'unit': "PT"},
'dashStyle': "SOLID"
},
'tabStops': [
{
'offset': {
'magnitude': 431.84999999999997,
'unit': 'PT'
},
'alignment': 'END'
}
],
},
'range': {'startIndex': 1, 'endIndex': 10},
'fields': "tabStops,namedStyleType,alignment,direction,borderBottom"
}}
但它抱怨tabStops
:
E googleapiclient.errors.HttpError: <HttpError 400 when requesting
https://docs.googleapis.com/v1/documents/1RGkXvV8M321KiuDjbMCQwzc52iEEPRxpFqttKmXnWwQ:batchUpdate?alt=json
returned "Invalid requests[2].updateParagraphStyle: Unallowed field: tabStops". Details: "Invalid
requests[2].updateParagraphStyle: Unallowed field: tabStops">
其他字段工作正常.. 即命名样式类型、对齐、方向、边框底部
解决方案
推荐阅读
- scala - 使用 Spark 中的分析语句计算统计信息
- mysql - Entity Framework:如何在 Entity Framework Core 2.x 中应用特定于提供程序的模型更改?
- sql-server - 如何修复数据流任务错误
- pdf - 如何在 NetSuite 的高级 PDF 模板中插入自定义字段?
- android - 如何从android pie中的内容uri获取文件路径
- go - 使用 go mod 时如何解决“模糊导入”?
- sql-server - 我可以在 sql 游标中使用 sql 递归吗?
- ios - Swift 中的“mutating”函数和“inout”参数有什么区别吗?
- javascript - 如何使用javascript在饼图标题中添加字体真棒图标
- logstash - 无法删除 logstash.conf 中的某些字段