【发布时间】:2022-10-12 21:22:55
【问题描述】:
我在 Python 3.10 中收到以下错误:
回溯(最近一次通话最后): 文件“.../smartsheet.py”,第 13 行,在 动作 = smartsheet.Sheets.list_sheets(include_all=True) AttributeError:模块 'smartsheet' 没有属性 'Sheets'
环境: Python 3.10.5(v3.10.5:f377153967,2022 年 6 月 6 日,12:36:10)[Clang 13.0.0 (clang-1300.0.29.30)] Mac OS 12.5,M1 MacBook Pro PyCharm 2022.1.4(专业版) smartsheet-python-sdk-py39 (2.105.1.10) 和 smartsheet-python-sdk (2.177.1)
import smartsheet
import logging
TOKEN = '<<suppressed for security>>'
logging.getLogger('smartsheet').setLevel(logging.CRITICAL)
smart = smartsheet.Smartsheet(access_token=TOKEN)
action = smartsheet.Sheets.list_sheets(include_all=True)
print(action) # Just a placeholder to set a breakpoint
代码是从项目示例中提取出来的,所以我很困惑。任何帮助表示赞赏。
【问题讨论】:
标签: python python-3.x smartsheet-api-2.0