sh-1 key error
Closed this issue · 1 comments
adamSales commented
Just FYI:
This is a bug in the current CRAN version (tikzDevice_0.10-1) but goes away when I install via github (version 0.10-3).
With any plot, I get the error
Error in sha1(key) : object 'C_sha1_object' not found
Apparently, in the version 0.10-1, the line of code
sha1 <- filehash:::sha1
from cacheMetrics.R is missing (EDIT: or something like that, I don't actually know).
Anyway, with the current github version (0.10-3) it works.
Here's an example where I get the error:
R> install.packages('tikzDevice')
Installing package into 'C:/Users/acs3238/R/win-library/3.4'
(as 'lib' is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tikzDevice_0.10-1.zip'
Content type 'application/zip' length 622197 bytes (607 KB)
downloaded 607 KB
package 'tikzDevice' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\acs3238\AppData\Local\Temp\Rtmp0OgkYh\downloaded_packages
R> library(tikzDevice)
R> tikz('test.pdf')
R> plot(1:10)
Creating temporary TikZ metrics dictionary at:
C:\Users\acs3238\AppData\Local\Temp\Rtmp0OgkYh/tikzMetricsDictionary
Using TikZ metrics dictionary at:
C:\Users\acs3238\AppData\Local\Temp\Rtmp0OgkYh/tikzMetricsDictionary
Error in sha1(key) : object 'C_sha1_object' not found
R> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tikzDevice_0.10-1
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2 filehash_2.3 grid_3.4.2
And here's it working with the new version:
R> devtools::install_github('yihui/tikzDevice')
Downloading GitHub repo yihui/tikzDevice@master
from URL https://api.github.com/repos/yihui/tikzDevice/zipball/master
Installing tikzDevice
"c:/PROGRA~1/R/R-34~1.2/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/acs3238/AppData/Local/Temp/RtmpCkNspN/devtools2be43a8b60b8/yihui-tikzDevice-ae6ff68" \
--library="C:/Users/acs3238/R/win-library/3.4" --install-tests
* installing *source* package 'tikzDevice' ...
** libs
C:/Rtools/mingw_64/bin/gcc -I"c:/PROGRA~1/R/R-34~1.2/include" -DNDEBUG -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -std=gnu99 -mtune=core2 -c tikzDevice.c -o tikzDevice.o
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o tikzDevice.dll tmp.def tikzDevice.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -Lc:/PROGRA~1/R/R-34~1.2/bin/x64 -lR
installing to C:/Users/acs3238/R/win-library/3.4/tikzDevice/libs/x64
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (tikzDevice)
R> library(tikzDevice)
R> tikz('test.pdf')
R> plot(1:10)
Creating temporary TikZ metrics dictionary at:
C:\Users\acs3238\AppData\Local\Temp\RtmpCkNspN/tikzMetricsDictionary
Using TikZ metrics dictionary at:
C:\Users\acs3238\AppData\Local\Temp\RtmpCkNspN/tikzMetricsDictionary
Measuring dimensions of: m
Measuring dimensions of: 2
Measuring dimensions of: \char77
Measuring dimensions of: 4
Measuring dimensions of: 6
Measuring dimensions of: 8
Measuring dimensions of: 10
Measuring dimensions of: Index
Measuring dimensions of: 1:10
R> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tikzDevice_0.10-3
loaded via a namespace (and not attached):
[1] httr_1.2.1 compiler_3.4.2 R6_2.1.2 tools_3.4.2
[5] withr_2.0.0 curl_1.1 memoise_1.0.0 filehash_2.3
[9] grid_3.4.2 knitr_1.17 git2r_0.15.0 digest_0.6.10
[13] devtools_1.12.0
krlmlr commented
Thanks. This is likely due to an update of the filehash package, currently reinstallation of the tikzDevice package is required after updating filehash. Will fix.