-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
fixedFixed in last versionFixed in last versionnc upstream issuewaiting for it to be fixed/implemented in the Nextcloudwaiting for it to be fixed/implemented in the Nextcloud
Description
nc.ocs(method="GET", path="/apps/groupfolders/folders")
results in a JSONDecodeError:
Exception has occurred: JSONDecodeError
Expecting value: line 1 column 1 (char 0)
StopIteration: 0
During handling of the above exception, another exception occurred:
File ".../nc_py_api/nc_py_api/_session.py", line 216, in ocs
response_data = loads(response.text)
^^^^^^^^^^^^^^^^^^^^
File ".../nc_py_api/nc_py_api/nextcloud.py", line 144, in ocs
return self._session.ocs(method, path, content=content, json=json, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../customer-data-nextcloud/nextcloud_api_test/nc-py-api.py", line 51, in <module>
folders = nc.ocs(method="GET", path="/apps/groupfolders/folders")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Checking the response and also testing with curl, it seems that the server sends xml back per default. With curl, this can be fixed by adding -H "Accept: application/json"
- this should be done per default in the ocs function as well.
Metadata
Metadata
Assignees
Labels
fixedFixed in last versionFixed in last versionnc upstream issuewaiting for it to be fixed/implemented in the Nextcloudwaiting for it to be fixed/implemented in the Nextcloud