Skip to content

Commit 700eee0

Browse files
committed
fix: import header
1 parent 396dd66 commit 700eee0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cytomine/cytomine.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -726,15 +726,16 @@ def import_datasets(self, path: str, storage_id: int) -> bool:
726726
upload_host,
727727
"",
728728
),
729-
headers=self._headers(content_type="application/json"),
729+
headers=self._headers(content_type="text/plain"),
730730
params={
731+
"host": upload_host,
731732
"path": path,
732733
"storage_id": storage_id,
733734
},
734735
)
735736

736737
if response.status_code != requests.codes.ok:
737-
self._logger.error("Error during datasets upload.")
738+
self._logger.error("Error during datasets upload: %s", response.text)
738739
return False
739740

740741
self._logger.info("Datasets uploaded successfully")

0 commit comments

Comments
 (0)