Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Troubles with API Key for the NCBO Annotator

Jennifer Leigh Vendetti vendetti at stanford.edu
Thu Mar 16 11:17:03 PDT 2017


Hello Scott,

I need a little more detail.  Do you mean that you’re successfully getting results from the annotator service with the exception of one of your sentence inputs?  If so, could you please send the full request that gives you an error?

Best,
Jennifer


On Mar 16, 2017, at 5:46 AM, Scott Keating <sjk3001 at med.cornell.edu<mailto:sjk3001 at med.cornell.edu>> wrote:

Hello Jennifer!

Thanks for getting back to me. I tried running the code again this morning and it was more successful. It ran each of my lines of text, but at the very end it gave be an “error: bad request” error. I know it is not you or your colleagues job to correct my code, but have any of you run into this problem with people using R before? Thanks!

Scott

From: Jennifer Leigh Vendetti [mailto:vendetti at stanford.edu]
Sent: Wednesday, March 15, 2017 2:05 PM
To: Scott Keating
Cc: support at bioontology.org<mailto:support at bioontology.org>
Subject: Re: [bioontology-support] Troubles with API Key for the NCBO Annotator

Hello Scott,

We had a BioPortal outage this morning, which was likely the cause of the error you saw.  BioPortal has been restored - please try again and let us know if you’re still experiencing issues.

Apologies for the inconvenience.

Kind regards,
Jennifer


On Mar 15, 2017, at 7:16 AM, Scott Keating <sjk3001 at med.cornell.edu<mailto:sjk3001 at med.cornell.edu>> wrote:

Hello,

My name is Scott Keating, and I am a research aide at Weill Cornell Medical College in New York City. I am emailing you today because I am receiving a strange error in running some code for the NCBO annotator that I am hoping you might be able to help with. After running the following code in the “R” programming language, the following error occurs: “Error: Unauthorized”. If anyone happens on your end happens to know what my problem might be, I would greatly appreciate their input. I have entered both my unique API key, and also the simple work “apikey” to no avail. I have emailed you all before and you were very helpful. Thank you for your hard work! The following is my R code:

library(bitops)
library(RCurl)
url <- "http://data.bioontology.org/annotator<https://urldefense.proofpoint.com/v2/url?u=http-3A__data.bioontology.org_annotator&d=DwMGaQ&c=lb62iw4YL4RFalcE2hQUQealT9-RXrryqt9KZX2qu2s&r=gNSeUu4B_kecJsXWJxhIzW1F-KFZO3wQZ16xKyHx9nw&m=p3PED02Xp4g4DGvqAl8K2iym4uX7KVagIwyoHpncPPc&s=Oqqm-mdJmMh3DhRQM6vY0ZaruNAmNgm4wUCC3mL3wcw&e=>"
cat(url,"\n")
text <- readLines("C:/Users/SJK3001/Desktop/text.txt")
apikey <- "fbcd9b23-1a86-4e1d-9af2-ac417482bdef"

for (sentence_id in 1:length(text)) {
  current_sentence <-
    as.character(text[sentence_id]) # current sentence to process
  cat("#", sentence_id, "from", length(text),
      ":", current_sentence, "\n")
result <- postForm(url,
                   "text"=current_sentence,
                   "apikey"=apikey,
                   "ontologies"={"DDO"},
                   "exact_match"="false",
                   #"include" = "all"
                   "mappings"= "all",
                   "whole_word_only"="false",
                   "format"="xml")
}

Again, I think the problem has something to do with the API key based on the error. Thank you for your help!

Best,
Scott Keating
_______________________________________________
bioontology-support mailing list
bioontology-support at lists.stanford.edu<mailto:bioontology-support at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/bioontology-support<https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.stanford.edu_mailman_listinfo_bioontology-2Dsupport&d=DwMGaQ&c=lb62iw4YL4RFalcE2hQUQealT9-RXrryqt9KZX2qu2s&r=gNSeUu4B_kecJsXWJxhIzW1F-KFZO3wQZ16xKyHx9nw&m=p3PED02Xp4g4DGvqAl8K2iym4uX7KVagIwyoHpncPPc&s=eXD3ARmge-2TBZn68geGQeaetfDCti9ssJtwYQ5Dlqc&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20170316/cdbbba82/attachment-0001.html>


More information about the bioontology-support mailing list