question

Upvotes
Accepted
20 8 5 10

Install TRTH library for R: embedded nul error

I downloaded TRTH library for R (THAPI.ZIP) updated on Thursday, July 14, 2016 from

https://developers.refinitiv.com/en/api-catalog/datascope-select/datascope-select-soap-api/downloads

When I run in R:

install.packages("path/toTHAPI.ZIP", repos=NULL, type="win.library")

I get the error:

Error in rawToChar(block[seq_len(ns)]) :

embedded nul in string: 'PK\003\004\n\0\0\0\0\0`{­D\0\0\0\0\0\0\0\0\0\0\0\0\006\0\034\0THAPI/UT\t\0\003#­qS9­qSux\v\0\001\004ù\001\0\0\004\024\0\0\0PK\003\004\024\0\0\0\b\0]{­DæÔ\025¸õ\0\0\0c\001\0\0\021\0\034\0THAPI/'

I use R version 3.3.1 (2016-06-21) under Windows.


tick-history-rest-apirsetup
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
7.6k 15 6 9

@Yaphet

You have to manually unzipped and manually zipped it back. However from description file,it build with R 3.1.0 and I guess that it's not compatible with 3.3.1. Answer from the following post may help.


https://community.developers.refinitiv.com/questions/9090/issues-with-the-installing-the-eikon-api-for-r-pac.html

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.

Thanks, I did unzip and zip, but I install some other packages, must I uninstall R and install a version 3.1.0?

I'm not R expert. But from my test, I have installed multiple version of R on my windows and it allows me to select specific version of R to run. Also if you are using free version of R Studio, you can select R version to run with your library.

Yaphet avatar image Yaphet moragodkrit.chumsri_1

So I must install another version R? Could I install different version in the same laptop?

Upvotes
20 8 5 10

May be the zip file is corrupted.

After downloading it again to be sure it was not an network problem, I manually unzipped and manually zipped it back.

Now I can install the the package, but when I load it I get:

> library(THAPI)
Error in .mergeMethodsTable(generic, mtable, tt, attach) :
trying to get slot "defined" from an object of a basic class ("list") with no slots
Error: package or namespace load failed for ‘THAPI’
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 met the same question as yours. How do you solve it then?

Upvotes
20 8 5 10

Could I install different version in the same laptop?

yes

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
17 1 5 10

Looks like it is high time for TR to wake up and update the zip

I have tried to install from current version (3.3.2 in my case) and from 3.1.0, both original zip and rezipped document (both with THAPI.zip/THAPI structure and having the package in THAPI.zip directly). Whatever I do I get 'THAPI.ZIP/DESCRIPTION' cannot be read (I can open it and it is there).

If I do "type="binary" instead, I get the "embedded nul" error.

Also, if RCurl, XML, and base64 packages are indeed required, they are no longer available for 3.1.0. So if we were all succeeding with installs for 3.1.0, I am not sure that the package would work anyway.

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.

Click below to post an Idea Post Idea