microsoftgraph / microsoftgraph/msgraph-sdk-python

WorkbookTableColumn doesn't accept "values"

未关闭
#896 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:documentation type:bug
主要语言
Python
星标
630
派生
96
平均合并
15 小时 20 分钟
30 天内合并 PR
3

描述

Describe the bug

Using same syntax than in this code snippet from documentation gives error: "TypeError: WorkbookTableColumn.init() got an unexpected keyword argument 'values'"

# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.workbook_table_column import WorkbookTableColumn
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WorkbookTableColumn(
	id = "99",
	name = "name-value",
	index = 99,
	values = "values-value",
)

result = await graph_client.drives.by_drive_id('drive-id').items.by_drive_item_id('driveItem-id').workbook.tables.by_workbook_table_id('workbookTable-id').columns.post(request_body)

I can run the code without "values".

Expected behavior

I want to add also values similar to what I can via Graph Expoler.

How to reproduce

Try to add column to Excel with values.

SDK Version

1.7.0

Latest version known to work for scenario above?

No response

Known Workarounds

Using Graph Explorer

Debug output
Click to expand log ```
request_body = WorkbookTableColumn(

TypeError: WorkbookTableColumn.init() got an unexpected keyword argument 'values'

</details>


### Configuration

WSL 

### Other information

_No response_

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 Python SDK 使用的 WorkbookTableColumn 定义,并将其接受的构造函数字段与 SDK version 1.7.0 的文档片段进行比较。分别在有值和无值的情况下复现请求,然后验证是否可以按照 issue 中所示使用值创建列。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。