smartsheet api get sheet 方法报错
smartsheet api get sheet method giving error
我是 smartsheet 的新手,正在使用 api。 get_sheet 行 'type' 对象没有属性 __getitem__
出现以下错误
请告诉我有什么问题。
我看到有人使用此代码并得到回应。不知道出了什么问题。
sheet_id='0823....'
smartsheet_client = smartsheet.Smartsheet('6av...')
my_sheet = smartsheet_client.Sheets.get_sheet(sheet_id)
错误:
Traceback (most recent call last):
File "update.py", line 25, in <module>
my_sheet = smartsheet_client.Sheets.get_sheet(sheet_id)
File "C:\Python27\lib\site-packages\smartsheet\sheets.py", line 517, in get_sh
eet
response = self._base.request(prepped_request, expected, _op)
File "C:\Python27\lib\site-packages\smartsheet\smartsheet.py", line 243, in re
quest
native = res.native(expected)
File "C:\Python27\lib\site-packages\smartsheet\smartsheet.py", line 517, in na
tive
obj = class_(data, self._base)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 82, in _
_init__
deserialize(self, props)
File "C:\Python27\lib\site-packages\smartsheet\util.py", line 130, in deserial
ize
setattr(obj, key_, value)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 98, in _
_setattr__
super(Sheet, self).__setattr__(key, value)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 170, in
effective_attachment_options
self._effective_attachment_options.load(value)
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 310, in load
(EnumeratedValue(self.__enum, item)) for item in value
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 266, in __init_
_
self.set(value)
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 275, in set
self._value = self.__enum[value]
TypeError: 'type' object has no attribute '__getitem__'
检查安装包中的 enum34。 运行pip list
。我不是很肯定,但我相信我以前见过这个,它是一个缺少的枚举依赖项。
我是 smartsheet 的新手,正在使用 api。 get_sheet 行 'type' 对象没有属性 __getitem__
出现以下错误
请告诉我有什么问题。
我看到有人使用此代码并得到回应。不知道出了什么问题。
sheet_id='0823....'
smartsheet_client = smartsheet.Smartsheet('6av...')
my_sheet = smartsheet_client.Sheets.get_sheet(sheet_id)
错误:
Traceback (most recent call last):
File "update.py", line 25, in <module>
my_sheet = smartsheet_client.Sheets.get_sheet(sheet_id)
File "C:\Python27\lib\site-packages\smartsheet\sheets.py", line 517, in get_sh
eet
response = self._base.request(prepped_request, expected, _op)
File "C:\Python27\lib\site-packages\smartsheet\smartsheet.py", line 243, in re
quest
native = res.native(expected)
File "C:\Python27\lib\site-packages\smartsheet\smartsheet.py", line 517, in na
tive
obj = class_(data, self._base)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 82, in _
_init__
deserialize(self, props)
File "C:\Python27\lib\site-packages\smartsheet\util.py", line 130, in deserial
ize
setattr(obj, key_, value)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 98, in _
_setattr__
super(Sheet, self).__setattr__(key, value)
File "C:\Python27\lib\site-packages\smartsheet\models\sheet.py", line 170, in
effective_attachment_options
self._effective_attachment_options.load(value)
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 310, in load
(EnumeratedValue(self.__enum, item)) for item in value
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 266, in __init_
_
self.set(value)
File "C:\Python27\lib\site-packages\smartsheet\types.py", line 275, in set
self._value = self.__enum[value]
TypeError: 'type' object has no attribute '__getitem__'
检查安装包中的 enum34。 运行pip list
。我不是很肯定,但我相信我以前见过这个,它是一个缺少的枚举依赖项。