question

Upvotes
Accepted
6 2 3 5

Exception when requesting ceratin combination of paramters with HistoricalPricing.GetSummaries

When I modify the .NET example (2.0.0) code:

response = HistoricalPricing.GetSummaries(new HistoricalPricingSummaries.Params().Universe("DTEGn.DE") .WithInterval(HistoricalPricingSummaries.Interval.P1D)

.WithFields("DATE", "OFF_CLOSE")
.WithCount(10000));

I always get a "Newtonsoft.Json.JsonReaderException":

Failed to execute: GetSummaries error: {
"HTTPStatusCode": 200,
"HTTPReason": "OK",
"Exception": {
"ExceptionType": "Newtonsoft.Json.JsonReaderException",
"Message": "After parsing a value an unexpected character was encountered: u. Path '[0].data[713][0]', line 1, position 16395."


rdp-apirefinitiv-data-platformerror.netrefinitiv-data-platform-librariesjson
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
9.7k 49 38 60

Hi @martin.grunwald,

I've been informed that the issue has been resolved. I've tested against Eikon, which is where the error was occurring, and everything came through as expected. If you get a chance, please verify the issue has been resolved on your end. The issue was related to the Eikon Proxy.

Thanks for your patience.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
9.7k 49 38 60

Hi @martin.grunwald,

This error indicates that the Historical service in the backend may have sent an invalid JSON message. I went ahead and tried your exact example and unfortunately didn't receive an error. If you consistently receive an error, perhaps you can try a few things.

You should see a log file within your bin/x64/Debug directory in the form: RDPLog_<pid>.log. There may be output which shows the message coming from the historical service that is causing the exception.

Alternatively, you can turn on the trace levels within the library by doing the following:

using Refinitiv.DataPlatform; ... // At the top of your program, turn on tracing Log.Level = NLog.LogLevel.Trace;

This will show more details within the log.

Thirdly, you can go into the Playground and use the Interday Summary Endpoint and input your parameters there to give it a try to review the output.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

I found the log file (attached to this comment) RDPLog_32088.zip

The problem still persist but I don't think I can do anything about it on my side, it looks like some kind of buffer overrun issue.

Example form the log:

...

[\"2017-06-09\",17.125], [\"20My\u0016[\u0001\u0002\u0000?\u0014\u0003\u0003\u0000\u0001\u0001\u0016\u0003\u0003\u0000P?x?<$??Q?

...

rdplog-32088.zip (22.3 KiB)

Hi @martin.grunwald,

Thanks for the log file. Yes, I can see down deep in the response contains junk as you shown above which is obviously causing the message parsing to fail. I have run the command several times and have not seen the issue. Have you tried shortening the count from 10000 to 2000 (or some other number)? Have you tried sending this command within the Playground? I believe the message is being sent correctly from the server but something is trashing the buffer with garbage. Is the application you are using basically the example from the download package but with different parameters?

I'm trying to think of some possible causes, whether it could be memory or an application thread that could be trashing the memory image. I'm sure you've already tried this but clean and rebuild your application. If your application is different enough from the example, you could send me the whole thing so I can try it on my machine.

I used the example as is with minimal modification (as seen in the OP). In my actual application I'm now stitching together smaller request (300 at a time) as a workaround. I will eventually run into the same issue at about 5100 bars. I am running Windows 10 with German language settings, in my experience that might cause some text parsing issues. I have not tried the playground yet, but I can do this next.

Also, and may be unrelated. Sometimes I have a small dialog popping up from Eikon application which I assume is from catching an unhandeled exception. After that only restarting Eikon can fix the API. I haven't reported that one yet since I cannot reproduce it reliably.

Show more comments

Hi @martin.grunwald,

I was able to reproduce the issue. Using the RDP Library for .NET, I tested with both the Platform Session and Desktop Session and didn't initially have any issues. When I was testing with the Desktop Session, I was using Refinitiv Workspace, the next generation of Eikon, with no issues. However, when I switched my desktop over to Eikon, I saw the same thing as you. I believe it may be an issue with the Eikon Proxy but will confirm.

I will look into this a little deeper to see if there is a potential solution or version upgrade that will help. In the meantime, if you have access credentials for the Refinitiv Data Platform, you can build/test your application using the Platform Session. I will keep you posted.

Click below to post an Idea Post Idea