anaconda-graveyard / nb_anacondacloud

Interact with Anaconda Cloud
BSD 2-Clause "Simplified" License
5 stars 9 forks source link

Upload issue using Anaconda Cloud button #44

Open emb356 opened 7 years ago

emb356 commented 7 years ago

When I try to upload a notebook using the button in the toolbar, I get an error which reads: Error: ('Bad Request: Bad request syntax or unsupported method ([POST] https://api.anaconda.org/release/emb356/sample_separated_correlations/2017.09.04.1840 -> 400)', 400)

How can I fix this? I've update conda nb extensions already. This is on Windows 10

damianavila commented 7 years ago

This patch should fix that issue:

+ nb_anacondacloud/uploader.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nb_anacondacloud/uploader.py b/nb_anacondacloud/uploader.py
+index 7ee62c6..a6b1697 100644
+--- a/nb_anacondacloud/uploader.py
++++ b/nb_anacondacloud/uploader.py
+@@ -258,7 +258,7 @@ class AccountManager(object):
+             args.login_username,
+             args.login_password,
+             'https://api.anaconda.org',
+-            created_with='nb_anacondacloud', fail_if_already_exists=True,
++            created_with='nb_anacondacloud', fail_if_already_exists=False,
+             hostname=platform.node()
+         )