oeg-upm / ya2ro

Python package designed to create Research Objects out of simple YAML files. Given the dataset dois, source code links and author DOIs, ya2ro will generate an HTML representation of the aggregated contents, as well as an RO-Crate with the machine-readable representation of the Research Object
Apache License 2.0
4 stars 1 forks source link

Error when fields from a person (e.g. institution) is not available from ORCID #30

Closed dgarijo closed 2 years ago

dgarijo commented 2 years ago

Example, with ORCID: https://orcid.org/0000-0001-7588-6094 I got an error

Error:

ERROR: Unable to retrieve the affiliations, check if https://orcid.org/0000-0001-7588-6094 is up.
Traceback (most recent call last):
  File "/home/dgarijo/Documents/GitHub/ya2ro/ya2ro.py", line 119, in <module>
    main()
  File "/home/dgarijo/Documents/GitHub/ya2ro/ya2ro.py", line 58, in main
    process_yaml(args.input)
  File "/home/dgarijo/Documents/GitHub/ya2ro/ya2ro.py", line 93, in process_yaml
    data = data_wrapper.load_yaml(yaml)
  File "/home/dgarijo/Documents/GitHub/ya2ro/data_wrapper.py", line 174, in load_yaml
    data = init_paper(p.input_to_vocab, data)
  File "/home/dgarijo/Documents/GitHub/ya2ro/data_wrapper.py", line 273, in init_paper
    populate_authors(paper, input_to_vocab, data)
  File "/home/dgarijo/Documents/GitHub/ya2ro/data_wrapper.py", line 509, in populate_authors
    object.authors[i].position = ", ".join(orcid.get_affiliation())
TypeError: can only join an iterable
dgarijo commented 2 years ago

I would like a test for this (see this to get started)