Skip to content
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

scrap_zenodo.py: crashes when 'licence' not found #29

Open
benoistlaurent opened this issue Nov 7, 2023 · 0 comments
Open

scrap_zenodo.py: crashes when 'licence' not found #29

benoistlaurent opened this issue Nov 7, 2023 · 0 comments

Comments

@benoistlaurent
Copy link

❯❯ python scripts/scrap_zenodo.py --query params/query.yml --output ../data
2023-11-07 14:15:54 INFO /data/mdverse/mdverse-sources/scripts/scrap_zenodo.py
2023-11-07 14:15:54 INFO Scrap molecular dynamics datasets and files from Zenodo.
[...]
2023-11-07 14:16:46 DEBUG https://zenodo.org:443 "GET /api/records?q=resource_type.type%3A%22dataset%22+AND+filetype%3A%22zip%22++AND+%28%22molecular+dynamics%22+OR+%22molecular+dynamic%22+OR+%22molecular-dynamics%22+OR+%22molecular-dynamic%22+OR+%22md+trajectory%22+OR+%22md+trajectories%22+OR+%22md+simulation%22+OR+%22md+simulations%22+OR+%22gromacs%22+OR+%22gromos%22+OR+%22namd%22+OR+%22amber%22+OR+%22desmond%22+OR+%22amber96%22+OR+%22amber99%22+OR+%22amber14%22+OR+%22charmm%22+OR+%22charmm27%22+OR+%22charmm36%22+OR+%22martini%22%29&size=1000&page=1&status=published&access_token=hk5IwtmwSMMc55NwySokszz7bzNhleyxjWQlU5uOAQW6qZbVgvTlkHJiJ5w9 HTTP/1.1" 200 None
/data/mdverse/mdverse-sources/scripts/toolbox.py:173: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.
text_decode = BeautifulSoup(string, features="lxml").text
Traceback (most recent call last):
File "/data/mdverse/mdverse-sources/scripts/scrap_zenodo.py", line 434, in
datasets_tmp, texts_tmp, files_tmp = extract_records(resp_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/mdverse/mdverse-sources/scripts/scrap_zenodo.py", line 315, in extract_records
"license": hit["metadata"]["license"]["id"],
~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'license'
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant