openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
168 stars 63 forks source link

Import Metadata from DOI or URL fails #625

Closed ccaadeh closed 2 years ago

ccaadeh commented 5 years ago

First, a very minor point, but as this is software for copy editing, is it not mistaken/too informal to put eg. rather than e.g. in the following text? You must enter either a full URL eg. https://doi.org/1234/1234 or https://olh.openlibhums.org/articles/1234 or a DOI eg. 1234/1234

Logged in with privileged account: https://demojournal.janeway.systems/plugins/back_content/ Choose: 'Import Metadata from DOI or URL': Enter known good URL: https://plato.stanford.edu/entries/nietzsche/ Choose Mode: 'URL': Click on 'Go':

I get the following error:

Request Method: POST

https://demojournal.janeway.systems/plugins/back_content/doi_import/ 1.11.16 AttributeError 'NoneType' object has no attribute 'get' /home/martindev/demo/janeway/src/plugins/back_content/logic.py in parse_url_results, line 15 /home/martindev/virtualenv/demo_janeway_src/3.5/bin/python3.5 3.5.6 ['/home/martindev/demo/janeway/src', '/home/martindev/demo/janeway/src', '/opt/passenger-5.1.12-1.el7.cloudlinux/src/helper-scripts', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python35.zip', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5/plat-linux', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5/lib-dynload', '/opt/alt/python35/lib64/python3.5', '/opt/alt/python35/lib/python3.5', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib/python3.5/site-packages', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-bootstrap4', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/foundationform', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-mailgun', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/dynamicsites', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/ebooklib', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-materialize', '/path/to/installation/', '/path/to/your/virtualenv/name/lib/python3.5/site-packages/', '/home/martindev/demo/janeway/src/plugins'] Mon, 19 Nov 2018 06:58:31 +0000

The same happens for a know good DOI: 10.1017/CBO9781139107013 Choose: 'DOI': Click on 'Go':

Variable Value
url '10.1017/CBO9781139107013'
csrfmiddlewaretoken 'uMVJYKKlENRip4EmVBjfQEVlj8AighDochugUSVrpIpRx3qHTwCCS2ubqYBLTpdQ'
mode 'doi'
Request Method: POST

https://demojournal.janeway.systems/plugins/back_content/doi_import/ 1.11.16 IndexError list index out of range /home/martindev/demo/janeway/src/plugins/back_content/logic.py in get_and_parse_doi_metadata, line 51 /home/martindev/virtualenv/demo_janeway_src/3.5/bin/python3.5 3.5.6 ['/home/martindev/demo/janeway/src', '/home/martindev/demo/janeway/src', '/opt/passenger-5.1.12-1.el7.cloudlinux/src/helper-scripts', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python35.zip', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5/plat-linux', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib64/python3.5/lib-dynload', '/opt/alt/python35/lib64/python3.5', '/opt/alt/python35/lib/python3.5', '/home/martindev/virtualenv/demo_janeway_src/3.5/lib/python3.5/site-packages', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-bootstrap4', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/foundationform', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-mailgun', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/dynamicsites', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/ebooklib', '/home/martindev/virtualenv/demo_janeway_src/3.5/src/django-materialize', '/path/to/installation/', '/path/to/your/virtualenv/name/lib/python3.5/site-packages/', '/home/martindev/demo/janeway/src/plugins'] Mon, 19 Nov 2018 07:03:49 +0000

ajrbyers commented 5 years ago

Adding this to Trello, please ignore.