Skip to content

Commit

Permalink
fix(pyclient): fixed error when uploading updated molgenis.csv schema…
Browse files Browse the repository at this point in the history
… file (#4736)

* edited request headers in _upload_csv method

* updated README.md
  • Loading branch information
YpeZ authored Feb 19, 2025
1 parent 4a3da8f commit 90a4dc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tools/pyclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ pip install molgenis-emx2-pyclient
Releases of the Molgenis EMX2 Pyclient follow the release number of the accompanying release of the Molgenis EMX2 software.
Therefore, releases of the Pyclient are less frequent than those of EMX2 and the latest version of the Pyclient may differ from the latest version of Molgenis EMX2.

#### 11.61.2
Fixed: problem where the schema metadata could not be updated with `upload_file` and a `molgenis.csv` file

#### 11.57.0
- Added: feature 'truncate' to remove all entries from a table
- Added: option to filter results of `get` method by columns
Expand Down
3 changes: 2 additions & 1 deletion tools/pyclient/src/molgenis_emx2_pyclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ def _upload_csv(self, file_path: pathlib.Path, schema: str) -> str:
response = self.session.post(
url=api_url,
data=data,
headers={'Content-Type': 'text/csv'}
headers={'Content-Type': 'text/csv',
'fileName': file_name}
)
if response.status_code == 200:
msg = response.text
Expand Down

0 comments on commit 90a4dc7

Please sign in to comment.