-
Notifications
You must be signed in to change notification settings - Fork 39
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
curl: (3) URL using bad/illegal format or missing URL #15
Comments
I'm having the same issue, any update on this? |
It's a little more complicated now. You gotta follow these instructions: https://developers.zenodo.org/ I ended up running the following script:
I forgot how I got the bucket id but I also have a json file that I don't remember making. That may have been where I got my bucket? It's been a few months since I ran this but that link I posted should have all the info you need. |
Here's a typical workflow you can use in Python, based on the developer docs above. I used this in Colab: import requests
from google.colab import userdata
ACCESS_TOKEN = userdata.get('ZENODO_TOKEN')
DEPOSITION_ID = <your-id>
r = requests.get(f'https://zenodo.org/api/deposit/depositions/{DEPOSITION_ID}',
params={'access_token': ACCESS_TOKEN})
r.status_code
data = r.json() def upload(filename, path, bucket):
# This is verbatim from the docs, but they forgot the params section
with open(path, "rb") as fp:
r = requests.put(
"%s/%s" % (bucket, filename),
data=fp,
params={'access_token': ACCESS_TOKEN},
)
return r.json() Usage: upload(file, path, data['links']['bucket']) Seems to work fine for me. |
Here's my error:
Here's my script:
The text was updated successfully, but these errors were encountered: