For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 2

Matlab using ThomsonReuters.Desktop.SDK.DataAccess throws "One or more requested types cannot be loaded."

Matlab (treikonnet) using ThomsonReuters.Desktop.SDK.DataAccess throws the error "One or more requested types cannot be loaded."

Firstly, ALL the examples in "NET APIs for use in custom applications" WORKS; see net-apis-use-custom-applications, including the Example Time Series API.

I installed the files here c:\temp\eikon\Usage Example Time series API\. Call this LIB

I wanted to make use of the MATLAB (64bit, R2018a) TimeSeriesExample.m provided here using-eikon-net-sdk-matlab
Even after days of trying, I CANNOT get this to work.

The error message line 24 of treikonnet.m is "One or more requested types cannot be loaded. Get the property LoaderExeption" (translated from Danish). Line 24 reads
t.Assembly{1} = NET.addAssembly([eikonsdkpath 'ThomsonReuters.Desktop.SDK.DataAccess.dll']);

How I installed:
I created a new folder c:\temp\eikon\EikonNetSDKnew\ and I copy the following files into this:

  • LIB\packages\Common.Logging.3.4.1\lib\net40\Common.Logging.dll
  • LIB\packages\Newtonsoft.Json.11.0.2\lib\net40\Newtonsoft.Json.dll
  • LIB\packages\protobuf-net.2.3.13\lib\net40\protobuf-net.dll
  • LIB\packages\ThomsonReuters.Desktop.SDK.DataAccess.Signed.x64.1.8.4\lib\net40-Client\ThomsonReuters.Desktop.SDK.DataAccess.dll
  • LIB\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\lib\net40-Client\ThomsonReuters.Udap.BusTools.dll
  • LIB\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\lib\net40-Client\ThomsonReuters.Udap.Ipc.Managed.Common.dll
  • LIB\packages\ThomsonReuters.Udap.Ipc.Signed.x64.2.10.5\lib\net40-Client\ThomsonReuters.Udap.ManagedPS.dll


I get exactly the the same error message if I copy these also, as suggested in the forum

  • LIB\DataApiUsageExampleTimeseriesData\bin\Debug\EikonPipeDll.dll
  • LIB\DataApiUsageExampleTimeseriesData\bin\Debug\i18nresource.dll
  • LIB\DataApiUsageExampleTimeseriesData\bin\Debug\msvcp120.dll
  • LIB\DataApiUsageExampleTimeseriesData\bin\Debug\msvcr120.dll


Then, if I run TimeSeriesExample.m and changed the reference to " c:\temp\eikon\EikonNetSDKnew\ ", the script throws the above mentioned error. I also tried with 64-bit R2016b.

Any suggestions to fix the problem. Any help greatly appreciated.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonmatlab
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.

1 Answer

Upvote
Accepted
39.2k 75 11 27

@bork,

I wonder how you installed the dependencies of Eikon .NET SDK. When I create a new solution in Visual Studio (or remove all installed packages from an existing solution) and use NuGet Package Manager to install ThomsonReuters.Desktop.SDK.DataAccess.Signed.x64 package, it gets installed with the following dependencies:
Common.Logging v2.1.2
Newtonsoft.Json v6.0.8
protobuf-net v2.0.0.668
It looks like in your case you somehow ended up with the latest versions of the above packages available from NuGet. I think this may be the root cause of the error you experienced. Although you mentioned that the C# examples you downloaded from this portal worked for you, and I would expect the same error if you used the same packages with the same versions of the dependencies. In any case I suggest as the first step in troubleshooting that you replace the versions of Common.Logging.dll, Newtonsoft.Json.dll and protobuf-net.dll with the versions I specified above. Let me know if it helps.

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.

Thank you @Alex Putkov. for your suggestion and well spotted. I did allow the nuget package to be updated (in my VS2017) and this was the source of error.

For future users, one may use the VS solution "DataApiUsageExampleTimeseriesData.sln" from the "Usage Example Time series API.zip" to generate the needed files, however, make sure not to update the nuget packages (!). I then copied the needed files from \Usage Example Time series API\DataApiUsageExampleTimeseriesData\bin\Debug\ into a new folder that the Matlab script referred to. Now the Matlab script works for me.

Click below to post an Idea Post Idea