Error screen whilst renaming photos

71 views
Skip to first unread message

Ezekiel Gading

unread,
Oct 2, 2020, 4:09:32 PM10/2/20
to camtrapR
Hello everyone,  I was attempting to rename my file and I keep getting the error:
boma:    5 images      |====================|  100%Error in rep(list.dirs(dirs[i], full.names = FALSE, recursive = FALSE),  :   invalid 'times' argument

This is the code I ran that resulted in the error

wd_images_raw<-'C:/Users/ssjki/OneDrive/Desktop/VervetStudy/testimages'

wd_images_renamed <- 'C:/Users/ssjki/OneDrive/Desktop/VervetStudy/renamed_test'

stationinfo <-read.csv('StationID/StationID.csv')

stationinfo$startdate <- as.Date(stationinfo$startdate)

###fix date and time issue###

fixDateTimeOriginal(inDir=wd_images_raw,

                    recursive = TRUE)

###image renaming###

renamed <-imageRename(inDir=wd_images_raw,

                      outDir=wd_images_renamed,

                      hasCameraFolders= TRUE,

                      keepCameraSubfolders= TRUE,

                      copyImages=TRUE)

For context, I have a reconyx hyperfire 2 camera. I do not know the model but I fixed the date and time using the fixDateTimeOriginal function and it still shows this error. I would like to know what this error means and if I am doing something wrong. This is under camtrapR_2.0.3.  Thank you so much!

Juergen Niedballa

unread,
Oct 3, 2020, 7:59:07 AM10/3/20
to camtrapR
Hi, 
this seems to be an problem with stating that the stations have camera subdirectories (hasCameraFolders = TRUE) which makes camtrapR expect several subdirectoiries. The error arises if there's a station that has only one camera subdirectory. Is that the case?
I added a fix for the next release, so it shouldn't be a problem anymore. In the meantime you can download a preview in which it is fixed from the  github development branch:

library(devtools)

install_github("jniedballa/camtrapR", ref = "dev")

Please let me know if it works. Also, please be aware that the new development version contains a  few other changes, so have a look at the news section.

Best regards,

Jürgen


Juancho Vargas

unread,
Dec 15, 2020, 2:33:43 PM12/15/20
to camtrapR
I had the same issue, using the dev version solved it.

Thanks
Reply all
Reply to author
Forward
0 new messages