-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error renaming dataset due to missing content-type header #213
Comments
May be related to this galaxyproject/galaxy#2551 |
@gregvonkuster yep! Looks like the same error exactly. Wow, no one has tried to rename datasets in the API since 16.04? Or we just all re-invent the same workarounds? |
Likely both! ;) |
Are you both using external auth? We have a test for diff --git a/bioblend/galaxyclient.py b/bioblend/galaxyclient.py
index 01f836d..3cf7885 100644
--- a/bioblend/galaxyclient.py
+++ b/bioblend/galaxyclient.py
@@ -174,7 +174,8 @@ class GalaxyClient(object):
params = self.default_params
payload = json.dumps(payload)
- r = requests.put(url, verify=self.verify, data=payload, params=params)
+ headers = self.json_headers
+ r = requests.put(url, data=payload, params=params, headers=headers, verify=self.verify)
if r.status_code == 200:
try:
return r.json() |
Yes, using external auth. Yes, confirmed, that patch does fix it. |
Against 17.01, I saw the following error server side:
here galaxy checks for that header and errors if missing. I found a workaround by patching my
make_put_request
to add a header withapplication/json
, but I'm not sure this is the "correct" solution, so filing a bug here.the affected bioblend call is:
The text was updated successfully, but these errors were encountered: