rma = rmapy.api.Client()
rma.renew_token()
assert rma.is_auth()
collection = rma.get_meta_items()
filename = "examplenote"
doc = [f for f in collection if f.VissibleName == filename][0]
data = rma.download(doc)
>>>>>
data = rma.download(doc)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-13-b02e19e143e3> in <module>
----> 1 data = rma.download(doc)
~/PyEnvironments/remarkable/lib/python3.8/site-packages/rmapy/api.py in download(self, document)
241 log.debug("BLOB", document.BlobURLGet)
242 r = self.request("GET", document.BlobURLGet, stream=True)
--> 243 return from_request_stream(document.ID, r)
244
245 def delete(self, doc: DocumentOrFolder):
~/PyEnvironments/remarkable/lib/python3.8/site-packages/rmapy/document.py in from_request_stream(_id, stream)
366 tmp.write(chunk)
367 zd = ZipDocument(_id=_id)
--> 368 zd.load(tmp)
369 return zd
~/PyEnvironments/remarkable/lib/python3.8/site-packages/rmapy/document.py in load(self, file)
325 thumbnail_name = p.replace(".rm", ".jpg")
326 thumbnail_name = thumbnail_name.replace("/", ".thumbnails/")
--> 327 with zf.open(thumbnail_name, 'r') as tn:
328 thumbnail = BytesIO(tn.read())
329 thumbnail.seek(0)
/usr/lib/python3.8/zipfile.py in open(self, name, mode, pwd, force_zip64)
1512 else:
1513 # Get info object for name
-> 1514 zinfo = self.getinfo(name)
1515
1516 if mode == 'w':
/usr/lib/python3.8/zipfile.py in getinfo(self, name)
1439 info = self.NameToInfo.get(name)
1440 if info is None:
-> 1441 raise KeyError(
1442 'There is no item named %r in the archive' % name)
1443
KeyError: "There is no item named '6be3ffeb-418e-454e-b618-3f846841d83f.thumbnails/0.jpg' in the archive"