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

First API requests fail with incomplete data #13

Open
stain opened this issue Jul 23, 2015 · 4 comments
Open

First API requests fail with incomplete data #13

stain opened this issue Jul 23, 2015 · 4 comments

Comments

@stain
Copy link
Contributor

stain commented Jul 23, 2015

In the Docker installation of OPS_LinkedDataApi (see http://heater.cs.man.ac.uk:3002) , running of the docker branch which is equivalent to the 1.5.0 "branch" always fails on the first request for any identifier with PHP warnings.

For instance, for http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fidentifiers.org%2Funiprot%2FQ9Y5Y9 I first time got:

Warning: curl_multi_getcontent(): 157 is not a valid cURL handle resource in /var/www/html/ops_ims.class.php on line 147

Warning: curl_close(): 157 is not a valid cURL handle resource in /var/www/html/ops_ims.class.php on line 149

Warning: curl_multi_remove_handle(): 157 is not a valid cURL handle resource in /var/www/html/ops_ims.class.php on line 150

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/ops_ims.class.php:147) in /var/www/html/lda-response.class.php on line 578

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/ops_ims.class.php:147) in /var/www/html/lda-response.class.php on line 669

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/ops_ims.class.php:147) in /var/www/html/lda-response.class.php on line 670

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/ops_ims.class.php:147) in /var/www/html/lda-response.class.php on line 671

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/ops_ims.class.php:147) in /var/www/html/lda-response.class.php on line 679

This is followed by the response to the API call, e.g.

<?xml version="1.0" encoding="utf-8"?>
<result format="linked-data-api" version="1.5" href="http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fidentifiers.org%2Funiprot%2FQ9Y5Y9"><primaryTopic href="http://identifiers.org/uniprot/Q9Y5Y9"><exactMatch><item href="http://bio2rdf.org/drugbank:BE0004901"><targetForDrug href="http://bio2rdf.org/drugbank:DB00313"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Valproic Acid</genericName><drug_type><item xml:lang="en">approved [drugbank_resource:Approved]</item><item xml:lang="en">investigational [drugbank_resource:Investigational]</item></drug_type></targetForDrug><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><theoreticalPi><item datatype="float">5.42</item><item datatype="float">5.23</item><item datatype="float">8.04</item><item datatype="float">5.49</item><item datatype="float">6.35</item><item datatype="float">4.56</item><item datatype="float">4.72</item><item datatype="float">5.53</item><item datatype="float">6.18</item><item datatype="float">6.98</item><item datatype="float">7.45</item><item datatype="float">5.77</item><item datatype="float">4.35</item></theoreticalPi><cellularLocation><item datatype="string">Membrane; multi-pass membrane protein. It can be translocated to the extracellular membrane through</item><item datatype="string">Membrane; multi-pass membrane protein. Note=In neurite terminals</item><item datatype="string">Membrane</item><item datatype="string">Membrane; multi-pass membrane protein</item></cellularLocation></item><item href="http://bio2rdf.org/drugbank:BE0000177"><targetForDrug><item href="http://bio2rdf.org/drugbank:DB01173"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Orphenadrine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB01161"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Chloroprocaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00297"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Bupivacaine</genericName><drug_type><item xml:lang="en">approved [drugbank_resource:Approved]</item><item xml:lang="en">investigational [drugbank_resource:Investigational]</item></drug_type></item><item href="http://bio2rdf.org/drugbank:DB00961"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Mepivacaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00527"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Cinchocaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00892"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Oxybuprocaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB01002"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Levobupivacaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB06218"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Lacosamide</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00296"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Ropivacaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00281"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Lidocaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00721"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Procaine</genericName><drug_type><item xml:lang="en">approved [drugbank_resource:Approved]</item><item xml:lang="en">investigational [drugbank_resource:Investigational]</item></drug_type></item><item href="http://bio2rdf.org/drugbank:DB00807"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Proparacaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00645"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Dyclonine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00907"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Cocaine</genericName><drug_type><item xml:lang="en">illicit [drugbank_resource:Illicit]</item><item xml:lang="en">approved [drugbank_resource:Approved]</item></drug_type></item><item href="http://bio2rdf.org/drugbank:DB01086"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Benzocaine</genericName><drug_type xml:lang="en">approved [drugbank_resource:Approved]</drug_type></item><item href="http://bio2rdf.org/drugbank:DB00473"><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><genericName xml:lang="en">Hexylcaine</genericName><drug_type><item xml:lang="en">approved [drugbank_resource:Approved]</item><item xml:lang="en">withdrawn [drugbank_resource:Withdrawn]</item></drug_type></item></targetForDrug><inDataset href="http://www.openphacts.org/bio2rdf/drugbank"/><theoreticalPi datatype="float">5.77</theoreticalPi><cellularLocation datatype="string">Membrane; multi-pass membrane protein. It can be translocated to the extracellular membrane through</cellularLocation></item><item href="http://www.conceptwiki.org/concept/00059958-a045-4581-9dc5-e5a08bb0c291"><prefLabel xml:lang="en">Sodium channel protein type 10 subunit alpha (Homo sapiens)</prefLabel><inDataset href="http://www.conceptwiki.org"/></item><item href="http://purl.uniprot.org/uniprot/Q9Y5Y9"><molecularWeight datatype="int">220626</molecularWeight><inDataset href="http://purl.uniprot.org"/><sequence>MEFPIGSLETNNFRRFTPESLVEIEKQIAAKQGTKKAREKHREQKDQEEKPRPQLDLKACNQLPKFYGELPAELIGEPLEDLDPFYSTHRTFMVLNKGRTISRFSATRALWLFSPFNLIRRTAIKVSVHSWFSLFITVTILVNCVCMTRTDLPEKIEYVFTVIYTFEALIKILARGFCLNEFTYLRDPWNWLDFSVITLAYVGTAIDLRGISGLRTFRVLRALKTVSVIPGLKVIVGALIHSVKKLADVTILTIFCLSVFALVGLQLFKGN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GYLALLQVATFKGWMDIMYAAVDSREVNMQPKWEDNVYMYLYFVIFIIFGGFFTLNLFVGVIIDNFNQQKKKLGGQDIFMTEEQKKYYNAMKKLGSKKPQKPIPRPLNKFQGFVFDIVTRQAFDITIMVLICLNMITMMVETDDQSEEKTKILGKINQFFVAVFTGECVMKMFALRQYYFTNGWNVFDFIVVVLSIASLIFSAILKSLQSYFSPTLFRVIRLARIGRILRLIRAAKGIRTLLFALMMSLPALFNIGLLLFLVMFIYSIFGMSSFPHVRWEAGIDDMFNFQTFANSMLCLFQITTSAGWDGLLSPILNTGPPYCDPNLPNSNGTRGDCGSPAVGIIFFTTYIIISFLIMVNMYIAVILENFNVATEESTEPLSEDDFDMFYETWEKFDPEATQFITFSALSDFADTLSGPLRIPKPNRNILIQMDLPLVPGDKIHCLDILFAFTKNVLGESGELDSLKANMEEKFMATNLSKSSYEPIATTLRWKQEDISATVIQKAYRSYVLHRSMALSNTPCVPRAEEEAASLPDEGFVAFTANENCVLPDKSETASATSFPPSYESVTRGLSDRVNMRTSSSIQNEDEATSMELIAPGP</sequence><organism href="http://purl.uniprot.org/taxonomy/9606"/><mass datatype="int">220626</mass><existence href="http://purl.uniprot.org/core/Evidence_at_Protein_Level_Existence"/><classifiedWith><item href="http://purl.uniprot.org/keywords/597"/><item href="http://purl.uniprot.org/keywords/621"/><item href="http://purl.uniprot.org/keywords/677"/><item href="http://purl.uniprot.org/go/0055117"/><item href="http://purl.uniprot.org/keywords/851"/><item href="http://purl.uniprot.org/go/0034765"/><item href="http://purl.uniprot.org/go/0002027"/><item href="http://purl.uniprot.org/go/0005248"/><item href="http://purl.uniprot.org/keywords/325"/><item href="http://purl.uniprot.org/go/0035725"/><item href="http://purl.uniprot.org/go/0007600"/><item href="http://purl.uniprot.org/go/0006814"/><item href="http://purl.uniprot.org/keywords/225"/><item href="http://purl.uniprot.org/go/0019233"/><item href="http://purl.uniprot.org/keywords/1133"/><item href="http://purl.uniprot.org/keywords/1185"/><item href="http://purl.uniprot.org/go/0086069"/><item href="http://purl.uniprot.org/go/0086010"/><item href="http://purl.uniprot.org/go/0086067"/><item href="http://purl.uniprot.org/go/0070062"/><item href="http://purl.uniprot.org/go/0001518"/><item href="http://purl.uniprot.org/keywords/894"/><item href="http://purl.uniprot.org/go/0060371"/><item href="http://purl.uniprot.org/go/0019228"/><item href="http://purl.uniprot.org/keywords/832"/><item href="http://purl.uniprot.org/go/0044299"/></classifiedWith><alternativeName><item>Sodium channel protein type X subunit alpha</item><item>Voltage-gated sodium channel subunit alpha Nav1.8</item><item>Peripheral nerve sodium channel 3</item></alternativeName><Function_Annotation>Tetrodotoxin-resistant channel that mediates the voltage-dependent sodium ion permeability of excitable membranes. Assuming opened or closed conformations in response to the voltage difference across the membrane, the protein forms a sodium-selective channel through which sodium ions may pass in accordance with their electrochemical gradient. Plays a role in neuropathic pain mechanisms.</Function_Annotation></item></exactMatch></primaryTopic><activeLens>Default</activeLens><linkPredicate href="http://www.w3.org/2004/02/skos/core#exactMatch"/><extendedMetadataVersion href="http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fidentifiers.org%2Funiprot%2FQ9Y5Y9&amp;_metadata=all%2Cviews%2Cformats%2Cexecution%2Cbindings%2Csite"/><definition href="http://heater.cs.man.ac.uk:3002/api-config"/></result>

The errors cause the HTTP Content-Type to be wrong and obviously breaks parsing.

Later calls hit memcached, and do not give any errors.

If a resource is 404, I always get the error. So you can check this at:

http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fexample.org%2Fnotfound

Compare with with ops2, which do not fail:

http://ops2.few.vu.nl/target?uri=http%3A%2F%2Fexample.org%2Fnotfound

I can configure PHP to not print any warnings, but still this error indicates something is going wrong in the multi-batch call to IMS.

@stain
Copy link
Contributor Author

stain commented Jul 23, 2015

I now changed the docker image to silence those warnings:

root@3127b70f8fa2:/usr/local/etc/php/conf.d# cat ops-warnings.ini
display_errors=0
log_errors=1
html_errors=0

stain added a commit that referenced this issue Jul 23, 2015
@stain
Copy link
Contributor Author

stain commented Jul 23, 2015

Silencing the warning does not hide the problem. Now the first request does not include IMS-based information. So if I restart memcached, http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json says just:

{
  "format": "linked-data-api",
  "version": "1.5",
  "result": {
    "_about": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json",
    "definition": "http://heater.cs.man.ac.uk:3002/api-config",
    "extendedMetadataVersion": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json&_metadata=all%2Cviews%2Cformats%2Cexecution%2Cbindings%2Csite",
    "linkPredicate": "http://www.w3.org/2004/02/skos/core#exactMatch",
    "activeLens": "Default",
    "primaryTopic": {
      "_about": "http://www.conceptwiki.org/concept/00059958-a045-4581-9dc5-e5a08bb0c291",
      "exactMatch": [
        {
          "_about": "http://rdf.ebi.ac.uk/resource/chembl/target/CHEMBL5451",
          "hasTargetComponent": {
            "_about": "http://rdf.ebi.ac.uk/resource/chembl/targetcomponent/CHEMBL_TC_3744",
            "description": "Sodium channel protein type 10 subunit alpha",
            "inDataset": "http://www.ebi.ac.uk/chembl"
          },
          "inDataset": "http://www.ebi.ac.uk/chembl",
          "type": "http://rdf.ebi.ac.uk/terms/chembl#SingleProtein",
          "label": "Sodium channel protein type X alpha subunit"
        },
        {
          "_about": "http://purl.uniprot.org/uniprot/Q9Y5Y9",
          "Function_Annotation": "Tetrodotoxin-resistant channel that mediates the voltage-dependent sodium ion permeability of excitable membranes. Assuming opened or closed conformations in response to the voltage difference across the membrane, the protein forms a sodium-selective channel through which sodium ions may pass in accordance with their electrochemical gradient. Plays a role in neuropathic pain mechanisms.",
          "alternativeName": [
            "Voltage-gated sodium channel subunit alpha Nav1.8",
            "Sodium channel protein type X subunit alpha",
            "Peripheral nerve sodium channel 3"
          ],
          "classifiedWith": [
            "http://purl.uniprot.org/go/0086069",
            "http://purl.uniprot.org/keywords/597",
            "http://purl.uniprot.org/keywords/225",
            "http://purl.uniprot.org/keywords/621",
            "http://purl.uniprot.org/keywords/677",
            "http://purl.uniprot.org/go/0086067",
            "http://purl.uniprot.org/go/0060371",
            "http://purl.uniprot.org/go/0034765",
            "http://purl.uniprot.org/go/0035725",
            "http://purl.uniprot.org/go/0055117",
            "http://purl.uniprot.org/keywords/325",
            "http://purl.uniprot.org/go/0006814",
            "http://purl.uniprot.org/keywords/894",
            "http://purl.uniprot.org/go/0086010",
            "http://purl.uniprot.org/go/0005248",
            "http://purl.uniprot.org/go/0001518",
            "http://purl.uniprot.org/go/0019233",
            "http://purl.uniprot.org/go/0070062",
            "http://purl.uniprot.org/go/0019228",
            "http://purl.uniprot.org/keywords/851",
            "http://purl.uniprot.org/go/0002027",
            "http://purl.uniprot.org/keywords/832",
            "http://purl.uniprot.org/go/0044299",
            "http://purl.uniprot.org/keywords/1133",
            "http://purl.uniprot.org/keywords/1185",
            "http://purl.uniprot.org/go/0007600"
          ],
          "existence": "http://purl.uniprot.org/core/Evidence_at_Protein_Level_Existence",
          "mass": 220626,
          "organism": "http://purl.uniprot.org/taxonomy/9606",
          "sequence": "MEFPIGSLETNNFRRFTPESLVEIEKQIAAKQGTKKAREKHREQKDQEEKPRPQLDLKACNQLPKFYGELPAELIGEPLEDLDPFYSTHRTFMVLNKGRTISRFSATRALWLFSPFNLIRRTAIKVSVHSWFSLFITVTILVNCVCMTRTDLPEKIEYVFTVIYTFEALIKILARGFCLNEFTYLRDPWNWLDFSVITLAYVGTAIDLRGISGLRTFRVLRALKTVSVIPGLKVIVGALIHSVKKLADVTILTIFCLSVFALVGLQLFKGNLKNKCVKNDMAVNETTNYSSHRKPDIYINKRGTSDPLLCGNGSDSGHCPDGYICLKTSDNPDFNYTSFDSFAWAFLSLFRLMT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QKKYYNAMKKLGSKKPQKPIPRPLNKFQGFVFDIVTRQAFDITIMVLICLNMITMMVETDDQSEEKTKILGKINQFFVAVFTGECVMKMFALRQYYFTNGWNVFDFIVVVLSIASLIFSAILKSLQSYFSPTLFRVIRLARIGRILRLIRAAKGIRTLLFALMMSLPALFNIGLLLFLVMFIYSIFGMSSFPHVRWEAGIDDMFNFQTFANSMLCLFQITTSAGWDGLLSPILNTGPPYCDPNLPNSNGTRGDCGSPAVGIIFFTTYIIISFLIMVNMYIAVILENFNVATEESTEPLSEDDFDMFYETWEKFDPEATQFITFSALSDFADTLSGPLRIPKPNRNILIQMDLPLVPGDKIHCLDILFAFTKNVLGESGELDSLKANMEEKFMATNLSKSSYEPIATTLRWKQEDISATVIQKAYRSYVLHRSMALSNTPCVPRAEEEAASLPDEGFVAFTANENCVLPDKSETASATSFPPSYESVTRGLSDRVNMRTSSSIQNEDEATSMELIAPGP",
          "inDataset": "http://purl.uniprot.org",
          "molecularWeight": 220626
        }
      ],
      "isPrimaryTopicOf": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json"
    }
  }
}

While a Ctrl-R gives the expected, IMS-complete results:

{
  "format": "linked-data-api",
  "version": "1.5",
  "result": {
    "_about": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json",
    "definition": "http://heater.cs.man.ac.uk:3002/api-config",
    "extendedMetadataVersion": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json&_metadata=all%2Cviews%2Cformats%2Cexecution%2Cbindings%2Csite",
    "linkPredicate": "http://www.w3.org/2004/02/skos/core#exactMatch",
    "activeLens": "Default",
    "primaryTopic": {
      "_about": "http://www.conceptwiki.org/concept/00059958-a045-4581-9dc5-e5a08bb0c291",
      "inDataset": "http://www.conceptwiki.org",
      "exactMatch": [
        "http://www.conceptwiki.org/concept/00059958-a045-4581-9dc5-e5a08bb0c291",
        {
          "_about": "http://bio2rdf.org/drugbank:BE0000177",
          "cellularLocation": "Membrane; multi-pass membrane protein. It can be translocated to the extracellular membrane through",
          "theoreticalPi": 5.77,
          "inDataset": "http://www.openphacts.org/bio2rdf/drugbank",
          "targetForDrug": [
            {
              "_about": "http://bio2rdf.org/drugbank:DB01173",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Orphenadrine",
              "genericName": "Orphenadrine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB01161",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Chloroprocaine",
              "genericName": "Chloroprocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00297",
              "drug_type_en": [
                "approved [drugbank_resource:Approved]",
                "investigational [drugbank_resource:Investigational]"
              ],
              "drug_type": [
                "approved [drugbank_resource:Approved]",
                "investigational [drugbank_resource:Investigational]"
              ],
              "genericName_en": "Bupivacaine",
              "genericName": "Bupivacaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00961",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Mepivacaine",
              "genericName": "Mepivacaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00527",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Cinchocaine",
              "genericName": "Cinchocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00892",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Oxybuprocaine",
              "genericName": "Oxybuprocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB01002",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Levobupivacaine",
              "genericName": "Levobupivacaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB06218",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Lacosamide",
              "genericName": "Lacosamide",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00296",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Ropivacaine",
              "genericName": "Ropivacaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00281",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Lidocaine",
              "genericName": "Lidocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00807",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Proparacaine",
              "genericName": "Proparacaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00721",
              "drug_type_en": [
                "approved [drugbank_resource:Approved]",
                "investigational [drugbank_resource:Investigational]"
              ],
              "drug_type": [
                "approved [drugbank_resource:Approved]",
                "investigational [drugbank_resource:Investigational]"
              ],
              "genericName_en": "Procaine",
              "genericName": "Procaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00645",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Dyclonine",
              "genericName": "Dyclonine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00907",
              "drug_type_en": [
                "illicit [drugbank_resource:Illicit]",
                "approved [drugbank_resource:Approved]"
              ],
              "drug_type": [
                "illicit [drugbank_resource:Illicit]",
                "approved [drugbank_resource:Approved]"
              ],
              "genericName_en": "Cocaine",
              "genericName": "Cocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB01086",
              "drug_type_en": "approved [drugbank_resource:Approved]",
              "drug_type": "approved [drugbank_resource:Approved]",
              "genericName_en": "Benzocaine",
              "genericName": "Benzocaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            },
            {
              "_about": "http://bio2rdf.org/drugbank:DB00473",
              "drug_type_en": [
                "approved [drugbank_resource:Approved]",
                "withdrawn [drugbank_resource:Withdrawn]"
              ],
              "drug_type": [
                "approved [drugbank_resource:Approved]",
                "withdrawn [drugbank_resource:Withdrawn]"
              ],
              "genericName_en": "Hexylcaine",
              "genericName": "Hexylcaine",
              "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
            }
          ]
        },
        {
          "_about": "http://bio2rdf.org/drugbank:BE0004901",
          "cellularLocation": [
            "Membrane; multi-pass membrane protein. It can be translocated to the extracellular membrane through",
            "Membrane; multi-pass membrane protein. Note=In neurite terminals",
            "Membrane",
            "Membrane; multi-pass membrane protein"
          ],
          "theoreticalPi": [
            5.42,
            5.23,
            8.04,
            5.49,
            6.35,
            4.56,
            4.72,
            5.53,
            6.18,
            6.98,
            7.45,
            5.77,
            4.35
          ],
          "inDataset": "http://www.openphacts.org/bio2rdf/drugbank",
          "targetForDrug": {
            "_about": "http://bio2rdf.org/drugbank:DB00313",
            "drug_type_en": [
              "approved [drugbank_resource:Approved]",
              "investigational [drugbank_resource:Investigational]"
            ],
            "drug_type": [
              "approved [drugbank_resource:Approved]",
              "investigational [drugbank_resource:Investigational]"
            ],
            "genericName_en": "Valproic Acid",
            "genericName": "Valproic Acid",
            "inDataset": "http://www.openphacts.org/bio2rdf/drugbank"
          }
        },
        {
          "_about": "http://rdf.ebi.ac.uk/resource/chembl/target/CHEMBL5451",
          "hasTargetComponent": {
            "_about": "http://rdf.ebi.ac.uk/resource/chembl/targetcomponent/CHEMBL_TC_3744",
            "description": "Sodium channel protein type 10 subunit alpha",
            "inDataset": "http://www.ebi.ac.uk/chembl"
          },
          "inDataset": "http://www.ebi.ac.uk/chembl",
          "type": "http://rdf.ebi.ac.uk/terms/chembl#SingleProtein",
          "label": "Sodium channel protein type X alpha subunit"
        }
      ],
      "prefLabel_en": "Sodium channel protein type 10 subunit alpha (Homo sapiens)",
      "prefLabel": "Sodium channel protein type 10 subunit alpha (Homo sapiens)",
      "isPrimaryTopicOf": "http://heater.cs.man.ac.uk:3002/target?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F00059958-a045-4581-9dc5-e5a08bb0c291&_format=json"
    }
  }
}

Is this something going wrong with multiple IMS requests at once? Still now, if I do Ctrl-Shift-R a couple of times, sometimes Uniprot is included, other times drugbank might be missing.

@stain stain changed the title First request fails with "not a valid cURL handle resource" First API requests fail with incomplete data Jul 23, 2015
@stain
Copy link
Contributor Author

stain commented Aug 6, 2015

@antonisloizou do you know what this could be caused by..?

stain added a commit that referenced this issue Aug 17, 2015
@stain
Copy link
Contributor Author

stain commented Aug 17, 2015

I thinks this might be sensitive to the libcurl version.

I was able to work around this on the docker branch by disabling the handleAvailableResponses call - responses are still handled after the big loop.

I'll leave this open until this or a better fix has been added to develop.

stain added a commit that referenced this issue Nov 21, 2016
from docker branch

removed puelia README
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