dusadrian / venn

Draw Venn Diagrams
30 stars 7 forks source link

Error: `file("") only supports open = "w+" and open = "w+b": using the former` #2

Closed mmahmoudian closed 4 years ago

mmahmoudian commented 5 years ago

While testing the new version based on the commit 69f6517 I got error. I couldn't figure out what is causing the issue, but here is how to reproduce it:

remove.packages("venn", lib="~/R/x86_64-pc-linux-gnu-library/3.6")
devtools::install_github(repo = "dusadrian/venn", ref = "69f6517")

Downloading GitHub repo dusadrian/venn@master ✔ checking for file ‘/tmp/RtmpQs4V1G/remotes461e428c65d6/dusadrian-venn-69f6517/DESCRIPTION’ ... ─ preparing ‘venn’: ✔ checking DESCRIPTION meta-information ... ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ looking to see if a ‘data/datalist’ file should be added ─ building ‘venn_1.7-2.tar.gz’

Installing package into ‘/home/mehrad/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is unspecified)

  • installing source package ‘venn’ ... using staged installation R data inst byte-compile and prepare package for lazy loading help * installing help indices building package indices testing if installed package can be loaded from temporary location testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path
  • DONE (venn)
library("venn")
library("ggplot2")
library("ggpolypath")
venn::venn(x = list(letters[1:10], letters[5:25]), ggplot = T)

Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input In addition: Warning message: In file(file, "rt") : file("") only supports open = "w+" and open = "w+b": using the former

venn::venn(x = list(letters[1:10], letters[5:25]), ggplot = F)

Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input In addition: Warning message: In file(file, "rt") : file("") only supports open = "w+" and open = "w+b": using the former

sessionInfo()

R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.3 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=fi_FI.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=fi_FI.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fi_FI.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggpolypath_0.1.0 ggplot2_3.2.1 venn_1.7-2

loaded via a namespace (and not attached): [1] Rcpp_1.0.2 pillar_1.4.2 compiler_3.6.0 remotes_2.1.0 prettyunits_1.0.2 tools_3.6.0 testthat_2.2.1 digest_0.6.22
[9] pkgbuild_1.0.6 pkgload_1.0.2 memoise_1.1.0 tibble_2.1.3 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.1 cli_1.1.0
[17] rstudioapi_0.10 curl_4.2 withr_2.1.2 dplyr_0.8.3 fs_1.3.1 admisc_0.5 desc_1.2.0 devtools_2.2.1
[25] rprojroot_1.3-2 grid_3.6.0 tidyselect_0.2.5 glue_1.3.1 R6_2.4.0 processx_3.4.1 sessioninfo_1.1.1 purrr_0.3.3
[33] callr_3.3.2 magrittr_1.5 usethis_1.5.1 backports_1.1.5 scales_1.0.0 ps_1.3.0 ellipsis_0.3.0 assertthat_0.2.1 [41] colorspace_1.4-1 lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4

dusadrian commented 5 years ago

That error does not seem to have anything to do with the package itself, it must be something Linux related, or it might have something to do with the location where the package is installed.

The function venn() tries to read some files from the package's install location, using for instance: system.file("data", "sets.csv.gz", package = "venn")

This should work irrespective of the OS, but for some reason I suspect it does not work on your machine.

dusadrian commented 4 years ago

Solved in commit a82e44e