Error pulling data using extractionsContext.ExtractRaw

Options

Hello, I have been running an extraction script for several weeks with no issue, but now I am getting an exception when I try to extract the data. I've attached the code and exception below. The exception occurs at this line:: RawExtractionResult extractionResult = extractionsContext.ExtractRaw(extractionRequest);

 TickHistoryTimeAndSalesExtractionRequest extractionRequest = new TickHistoryTimeAndSalesExtractionRequest {
IdentifierList = InstrumentIdentifierList.Create(instrumentIdentifiers, instrumentOptions, false),
Condition = reportTemplate.Condition,
ContentFieldNames = { "Trade - Price", "Trade - Volume", "Quote - Bid Price", "Quote - Bid Size", "Quote - Ask Price", "Quote - Ask Size" }
};


extractionsContext.Options.AutomaticDecompression = false; //do not decompress
//extractionsContext.InstrumentListOperations.ValidateIdentifiersWithOptions()


Console.WriteLine("Beginning TRTH Extraction.");
RawExtractionResult extractionResult = extractionsContext.ExtractRaw(extractionRequest);



EXCEPTION::


ThomsonReuters.Dss.Api.InvalidResponseException occurred
HResult=0x80131500
Message=Invalid response, could not parse the following response:




<html>


<head id="Head1"><link rel="alternate" type="text/xml" href="/DatascopeApi/v1/ExtractionService.asmx?disco" />


<style type="text/css">

BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; }
#content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }
A:link { color: #336699; font-weight: bold; text-decoration: underline; }
A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; }
A:active { color: #336699; font-weight: bold; text-decoration: underline; }
A:hover { color: cc3300; font-weight: bold; text-decoration: underline; }
P { color: #000000; margin-top: 0px; margin-bottom: 12px; font-family: Verdana; }
pre { background-color: #e5e5cc; padding: 5px; font-family: Courier New; font-size: x-small; margin-top: -5px; border: 1px #f0f0e0 solid; }
td { color: #000000; font-family: Verdana; font-size: .7em; }
h2 { font-size: 1.5em; font-weight: bold; margin-top: 25px; margin-bottom: 10px; border-top: 1px solid #003366; margin-left: -15px; color: #003366; }
h3 { font-size: 1.1em; color: #000000; margin-left: -15px; margin-top: 10px; margin-bottom: 10px; }
ul { margin-top: 10px; margin-left: 20px; }
ol { margin-top: 10px; margin-left: 20px; }
li { margin-top: 10px; color: #000000; }
font.value { color: darkblue; font: bold; }
font.key { color: darkgreen; font: bold; }
font.error { color: darkred; font: bold; }
.heading1 { color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal; background-color: #003366; margin-top: 0px; margin-bottom: 0px; margin-left: -30px; padding-top: 10px; padding-bottom: 3px; padding-left: 15px; width: 105%; }
.button { background-color: #dcdcdc; font-family: Verdana; font-size: 1em; border-top: #cccccc 1px solid; border-bottom: #666666 1px solid; border-left: #cccccc 1px solid; border-right: #666666 1px solid; }
.frmheader { color: #000000; background: #dcdcdc; font-family: Verdana; font-size: .7em; font-weight: normal; border-bottom: 1px solid #dcdcdc; padding-top: 2px; padding-bottom: 2px; }
.frmtext { font-family: Verdana; font-size: .7em; margin-top: 8px; margin-bottom: 0px; margin-left: 32px; }
.frmInput { font-family: Verdana; font-size: 1em; }
.intro { margin-left: -15px; }

</style>

....

Inner Exception 1:
FormatSerializerException: Syntax error at Line 3, Char 0: expected valid json array or json object

Best Answer

  • Brian
    Brian LSEG
    Answer ✓

    There is a fix going into production this weekend (13-aug-2017) for this. Please try it again on Monday and let us know if there are any problems.

Answers

  • @helen.ristov, there is currently an issue with the TRTH servers that sometimes return location URLs that are in HTTP instead of HTTPS.

    Workarounds for C# are described in the last 2 responses for this query (see response by Jirapongse dated 4 Aug, and response by Veton Alia of today).

  • Thanks this is working again!