cv icon indicating copy to clipboard operation
cv copied to clipboard

Error in GetInfoFromOrcid

Open diogoprov opened this issue 8 years ago • 4 comments

Hi Brian, I'm having a hard time trying to use the code you provided as an example. It seems it's an error when the function tried to retrieve information from Orcid

GetInfoFromOrcid(id="0000-0002-0097-0651")

Error in subset.default(affiliations, type == "EDUCATION") : object 'type' not found

The same happens when I use in the other function

CreateMarkdown(GetInfoFromOrcid(id="0000-0002-0097-0651"), emphasis.name="Provete", scholar.id="qDwcLvIAAAAJ", impact.story.id = "0000-0002-0097-0651")

Here's my page on Orcid

diogoprov avatar Sep 16 '16 21:09 diogoprov

Same here...

Nowosad avatar Sep 18 '16 02:09 Nowosad

My apologies for getting to this so late. I tried running the code and it worked for me. It could be a momentary issue with ORCID, though a flaw in my code is far more likely. Could you just try it again and let me know?

bomeara avatar Oct 03 '16 01:10 bomeara

Hi @bomeara, I've tried it again. Right now:

  1. Your example is working fine.
  2. If I put my ORCID, I get an error:
Error in order(orcid.info$funding$"start-date.year.value", decreasing = TRUE) : 
  argument 1 is not a vector

I don't have any information about funding on my ORCID page. I'm not sure, but it looks like this is a reason for this error...

Nowosad avatar Oct 03 '16 01:10 Nowosad

Ah, ok, @Nowosad. Yes, the funding field being empty will cause a problem in both the initial pull of info and in creating the final markdown. My suggestion is to fork the code to take out the funding fields for now; a better solution is to code this more flexibly so it can detect absent fields and deal with them gracefully, but I won't have the opportunity to do this for the next couple of weeks (though pull requests are welcome if anyone can fix it first).

bomeara avatar Oct 03 '16 02:10 bomeara