nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

R: Unable to writeLipd because bagit unsuccessful #66

Closed chrismheiser closed 4 years ago

chrismheiser commented 4 years ago

Reported By : Devon Gorbey OS : Windows (10?) File : Gorby.CF8.2020

Original issue: Windows couldn't find the bagit file, and the process would fail with a message of " No bagit script was set. Skipping bagit..."

Fix attempt 1: I sent Devon the bagit.py file, and had him manually save it and set it as an environment variable.

Resulting issue: "Attempted to use bagit but it was unsuccessful. Skipping bagit..."

chrismheiser commented 4 years ago

image001 image

chrismheiser commented 4 years ago

I was able to recreate the issue. I have installed a windows environment so I can start debugging.

chrismheiser commented 4 years ago

Issue is resolved. This is not an error with the LiPD Utilities, but rather an issue with a change in how R works on windows.

In order for the Zip module to work on windows, it requires you to install R tools as a separate installation. I checked and could not find a good way to streamline this into an automated installation with the package. The user will have to do this manually.

I'll get this added to the documentation for the R Quickstart guide.

Download Link: https://cran.r-project.org/bin/windows/Rtools/

chrismheiser commented 4 years ago

Added link and note to install R Tools for windows users. Info in guide. E-mailed users who originally opened this ticket so that they know of the resolution.

nickmckay commented 4 years ago

Could we check for OS and the installation of that package when running writeLipd(), and then stop and tell the user to install that package if they're on Windows and it's not installed?

chrismheiser commented 4 years ago

Devon reported that Rtools solved his issue, so there is confirmation that it works.

I'll have to check and see if R is able to detect Rtools on installation.

chrismheiser commented 4 years ago

Yes, there is a function to detect Rtools, in the "pkgbuild" default library. I'll get that check added in.