Skip to content

KeyError when listing patients in workspace using 0.21.0 #102

@shifdz

Description

@shifdz

I am trying to list the patients in the workspace in ProKnow, but getting an error. This worked fine until recently. Proknow version: 0.21.0. How can I resolve this error?

----> 8 patients = pk.patients.query(workspaceName)
9 print(patients)

File ~.conda\envs\tf\lib\site-packages\proknow\Patients\Patients.py:240, in Patients.query(self, workspace, search)
238 if search is not None:
239 query["search"] = search
--> 240 return [PatientSummary(self, item.id, patient) for patient in self._query(item, query)]

File ~.conda\envs\tf\lib\site-packages\proknow\Patients\Patients.py:29, in Patients._query(self, workspace, query)
27 def _query(self, workspace, query):
28 res, data = self._requestor.get('/workspaces/' + workspace.id + '/patients', params=query)
---> 29 if res.headers['proknow-has-more'] == 'true': # pragma: no cover (difficult to test w/o lg num of patients)
30 next_query = dict(query)
31 next_query['page_epoch'] = res.headers['proknow-epoch']

File ~.conda\envs\tf\lib\site-packages\requests\structures.py:52, in CaseInsensitiveDict.getitem(self, key)
51 def getitem(self, key):
---> 52 return self._store[key.lower()][1]

KeyError: 'proknow-has-more'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions