Skip to content

First API requests fail with incomplete data #13

@stain

Description

@stain

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>MEFPIGSLETNNFRRFTPESLVEIEKQIAAKQGTKKAREKHREQKDQEEKPRPQLDLKACNQLPKFYGELPAELIGEPLEDLDPFYSTHRTFMVLNKGRTISRFSATRALWLFSPFNLIRRTAIKVSVHSWFSLFITVTILVNCVCMTRTDLPEKIEYVFTVIYTFEALIKILARGFCLNEFTYLRDPWNWLDFSVITLAYVGTAIDLRGISGLRTFRVLRALKTVSVIPGLKVIVGALIHSVKKLADVTILTIFCLSVFALVGLQLFKGNLKNKCVKNDMAVNETTNYSSHRKPDIYINKRGTSDPLLCGNGSDSGHCPDGYICLKTSDNPDFNYTSFDSFAWAFLSLFRLMTQDSWERLYQQTLRTSGKIYMIFFVLVIFLGSFYLVNLILAVVTMAYEEQNQATTDEIEAKEKKFQEALEMLRKEQEVLAALGIDTTSLHSHNGSPLTSKNASERRHRIKPRVSEGSTEDNKSP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SYFSPTLFRVIRLARIGRILRLIRAAKGIRTLLFALMMSLPALFNIGLLLFLVMFIYSIFGMSSFPHVRWEAGIDDMFNFQTFANSMLCLFQITTSAGWDGLLSPILNTGPPYCDPNLPNSNGTRGDCGSPAVGIIFFTTYIIISFLIMVNMYIAVILENFNVATEESTEPLSEDDFDMFYETWEKFDPEATQFITFSALSDFADTLSGPLRIPKPNRNILIQMDLPLVPGDKIHCLDILFAFTKNVLGESGELDSLKANMEEKFMATNLSKSSYEPIATTLRWKQEDISATVIQKAYRSYVLHRSMALSNTPCVPRAEEEAASLPDEGFVAFTANENCVLPDKSETASATSFPPSYESVTRGLSDRVNMRTSSSIQNEDEATSMELIAPGP</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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions