python - 无法转换脱颖而出
问题描述
从 JIRA rest API 导入字段到 excel 时,我经常遇到这个问题。
我的输出结果是
[None,
None,
None,
None,
<JIRA Resolution: name='Fixed', id='1'>,
None,
None,
<JIRA Resolution: name='Fixed', id='1'>,
None,
None,
None,
<JIRA Resolution: name='Done', id='10000'>,
<JIRA Resolution: name='Done', id='10000'>,
<JIRA Resolution: name='Done', id='10000'>,
<JIRA Resolution: name='Done', id='10000'>,
这是我下面的代码
res_list = []
issues_in_project = jira.search_issues('labels=team1', maxResults=False)
for issue in issues_in_project:
res_list.append(issue.fields.resolution)
res_row = 2
for res in res_list:
ws.cell(row=res_row, column=start_column+4).value = res
res_row += 1
错误是
217 elif value is not None:
--> 218 raise ValueError("Cannot convert {0!r} to Excel".format(value))
219
220 self._value = value
ValueError: Cannot convert <JIRA Resolution: name='Fixed', id='1'> to Excel
解决方案
推荐阅读
- javascript - 可以从 url 中省略 ID[] 吗?
- c++ - 从两个不同的类继承的非虚拟基类的访问成员
- jira - Jira - 避免收到有关更改/评论任务的邮件我是受让人
- python-2.7 - Python2 - proc.stdin 未将密码正确传递给 easyrsa
- python - 如何删除包含 alpha 值或整个 dbf 列的 dbf 行
- mysql - 需要链中承诺的数据
- javascript - 如何使用 javascript 禁用选项?
- javascript - 带有 Cron 的 HTML2Canvas
- javascript - 需要帮助将小数添加到 yaxis 值
- angular - 发布到生产环境后,使用 Angular 发布到 WebAPI 不起作用