Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Returned range name duplicates inner single quote

未关闭
#2,702 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@iam-ethan-huang 已经在做这个了。

开始于 2026年1月16日。

评估

这个 Issue 还没有评估数据。

描述

If you request data for a sheet with a inner single quote, like Jon's Data in the example, the returned range name will duplicate the inner quotes: 'Jon''s Data'!A1:Z1000.

Using this range name will then lead to errors like Unable to parse range: Jon''s Data!A1:Z1000 because the returned range name does not exist.

Environment details
  • OS type and version: macOS Tahoe 26.2
  • Python version: Python 3.10.15
  • pip version: pip 25.2
  • google-api-python-client version: google-api-python-client-2.188.0
Steps to reproduce
  1. use any valid credentials, the sheet is public
  2. run the code below, you should see the commented result printed
SPREADSHEET_ID = '1uK8QrcKrc_wierOMaIXxRKeE_fjt_8FfzpvrnuM1BhM'
RANGE_NAME = "'Jon's Data'"
result = service.spreadsheets().values().get(spreadsheetId=SPREADSHEET_ID, range=RANGE_NAME).execute()
print(result.get('range'))
# 'Jon''s Data'!A1:Z1000
主要语言
Python
星标
8.9k
派生
2.6k
平均合并
2 天 2 小时
30 天内合并 PR
15

贡献指南

打开贡献指南

从这里开始

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

googleapis/google-api-python-client 的其他 Issue

查看 googleapis/google-api-python-client 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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