还有其他人在为注释添加标签时遇到问题gkeepapi
吗?
import gkeepapi
keep = gkeepapi.Keep()
file = open("C:\\xxxxxxx", "r")
pwd = file.read()
keep.login('xxxxxxxx', pwd)
note = keep.createNote('title', 'text')
note.labels.add('calls')
给我这个错误。
Traceback (most recent call last):
File "C:/Users/Jason/Google Drive/pycharm/test.py", line 8, in <module>
note.labels.add('calls')
File "C:\Python27\lib\site-packages\gkeepapi\node.py", line 922, in add
self._labels[label.id] = label
AttributeError: 'str' object has no attribute 'id'
这是文档。https://gkeepapi.readthedocs.io/en/latest/#manipulating-labels-on-notes。我认为我在做正确的事,但我显然不是。