Trying to install janitor
Opened this issue · 13 comments
Hi!
Thanks for the feedback. I'd move the zip file out of the import folder before trying to install it and see if that helps.
Unfortunately, the same error :(
I'm less familiar with the system they have set up on TSD for windows machines (this tool was mainly made with the linux system in mind).
I'm going to need to do some debugging to figure out why things are not working for windows. Which I wont be able to solve today.
This might also be something USIT could give some input on, as the file permissions are something I cannot control. If you also create a support ticket to them about this, and give me feedback on what they say that would really help me a lot!
not sure if this was solved in the end. It seems the permissions problem has to do with the file.create(log_file) bit. Getting rid of that solved the issue for me.
oh right. Interesting. I'll have a look into that and see what I can do to resolve it. Thanks for reporting in!
Now that I look at the file path, it makes sense to me that it would fail in the import folder. I'll add instructions so that it's clear it should be moved out of the imports folder before running commands inside TSD.
I still had the problem after moving the files in my working directory, so perhaps that is not the (only) issue for TSD?
might be an issue of how I scope the filesystem. I'll do come checks on a windows VM soon. I didnt develop with windows in mind, which is why I havent thought of this part yet. I'll get to it when I can :)
thanks! still a very useful tool, with the small workaround above works well for me. Thanks for the great resource
I ran the following on my Windows PC:
tsd_package_prepare("docstring", folder="package_export", repos=getOption("repos"), verbose=TRUE, zip=TRUE)
Firstly, this did not create a zip file, but rather a folder containing the docstring package and all its dependencies as .tar.gz files, as well as a installation order file. I zipped the folder, imported it to TSD (windows computer) and put it in my current wd.
When I try to load the file using
tsd_package_install("docstring.zip")
I get the following error:
Installing roxygen2. Warning: Cannot open file 'docstring/roxygen2_7_2_3.tar.gz20230604-161240.txt': Permission denied. Error in file(con, "r") : Cannot open the connection
It seems the script generates a folder in my wd containing the packages but also generates a txt file each time which fails to open. The roxygen2 package is the first package in the pkg_install_order.list file.
Hi!
Thanks for the ticket! Sorry for the late reply, I only just got the time to sit down and have a look at it.
I am a little surprised that it wont zip correctly (which is what is happening) on windows. I've been digging a little in utils::zip
which does this process, and there is a little hint there for what might be going wrong.
I'd suggest trying to get RTools installed and testing again, I think (hope) that might be the missing piece.
https://cran.r-project.org/bin/windows/Rtools/
Make sure you get the right RTools installed for your R version. If you dont know your R version, it should tell you this in the R startup or when doing version()
in your R console
Thank you for the reply. I now managed to generate a .zip file directly (from the dplyr package), on my non-work PC (not restricted like the UiO PC) where I have RTools 4.3 (and R 4.3) installed. Unfortunately I did not check if it worked before installing RTools.
But it's not dplyr I'm trying to install. For the docstring package, I now get the following error message:
trying URL 'http://www.ibspan.waw.pl/~gagolews/stringi/icudt61l.zip' Error in utils::download.file(icudt61l, file.path(folder, "icudt61l.zip"), : cannot open URL 'http://www.ibspan.waw.pl/~gagolews/stringi/icudt61l.zip' In addition: Warning messages: 1: In utils::download.file(icudt61l, file.path(folder, "icudt61l.zip"), : downloaded length 0 != reported length 0 2: In utils::download.file(icudt61l, file.path(folder, "icudt61l.zip"), : cannot open URL 'https://www.ibspan.waw.pl//~gagolews/stringi/icudt61l.zip': HTTP status was '403 Forbidden'
No zip file gets generated.
It appears to be an issue with the stringi package, which returns some hits on Google as well. But this is way beyond my skill level to deal with!
THanks! This is a known issue, and I actually have a workaround buillt-in in the package, but it might look like the url I use for it is too old.