JoshOBrien / exiftoolr

ExifTool Functionality from R
https://joshobrien.github.io/exiftoolr/
23 stars 1 forks source link

No functioning version of Exiftool has been found. #5

Closed LafontRapnouilTristan closed 2 years ago

LafontRapnouilTristan commented 2 years ago

Hi Josh,

First, I would like to thank you for this very handy package!

Second, i'd like to report an issue I have to make it work on a new computer :)

I'm working on windows 10 and here are my version info : image

When installing exiftoolr either from CRANor github via install.packages("exiftoolr") or devtools::install_github("JoshOBrien/exiftoolr") seems to work perfectly well as it creates package folder in my `R library.

Running :

system.file("exiftool", package = "exiftoolr")

returns :

"C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool"

As it should.

I then run install_exiftool() which do create the win_exe folder with exiftool(-k) in it.

install_exiftool()

returns ->

Attempting to download ExifTool from https://exiftool.org/exiftool-12.34.zip
 [100%] Downloaded 6708072 bytes...
Installing ExifTool in C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe
system.file("exiftool/win_exe", package = "exiftoolr")

returns ->

"C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe"

and

system.file("exiftool/win_exe/exiftool(-k).exe", package = "exiftoolr")

returns ->

"C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe/exiftool(-k).exe"

So far all seems good to me. But when I run configure_exiftoolr() it returns :

Trying perl command: "" --version
Trying perl command: "perl" --version
Trying perl command: "C:\Perl64\bin\perl" --version
Trying perl command: "C:\Perl\bin\perl" --version
Trying perl command: "C:\Strawberry\perl\bin\perl" --version
Trying exiftool command:  -ver
Trying exiftool command: C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe/exiftool(-k).exe -ver
Trying exiftool command: exiftool -ver
Error in configure_exiftoolr() : 
  No functioning version of Exiftool has been found. To
download and install a local version into the exiftoolr
package, try doing install_exiftool()

I have probably done something wrong but can't figure out what... Would you have any idea/tips/ or suggestion?

Have a great day and thank you!

JoshOBrien commented 2 years ago

Odd that that's not working for you. I wonder what the problem is.

Would you try this command from your R session, and tell me what you get in response?

system2("C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe/exiftool(-k).exe", "-ver")

Also, from a Windows CMD shell, what happens when you type:

"C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe/exiftool(-k).exe" -ver

Finally, it would also be helpful for me to know if this is an issue that only affects the most recent version of exiftoolr (which I pushed up to CRAN just a couple of days ago). If you're willing to check that, you can do so by downloading exiftoolr_0.1.5.tar.gz from the CRAN archives here. After that, install by doing something like install.packages("exiftoolr_0.1.5.tar.gz"), then test using the same commands that did not work for you with the current version (0.1.6).

LafontRapnouilTristan commented 2 years ago

Hi!

Ok, so when I try your command in R it returns : 12.34 ( note that -ver requires quote "-ver"! )

Through the command prompt i got : 12.34 too.

Regarding installing an old version I can't as it seems that any older version isn't available in my current R version. I do not know how "tightly" package version are linked to R and if there is an "easy" way to bypass it.

Thanks again for your answers.

JoshOBrien commented 2 years ago

@LafontRapnouilTristan Does the "UsersName" portion of "C:/Users/UsersName/Documents/R/win-library/4.1/exiftoolr/exiftool/win_exe/exiftool(-k).exe" (or some other part of that) have a space in it? If so, I think that might be the issue, and am working on a fix for it.

LafontRapnouilTristan commented 2 years ago

It does!

Which is a really bad idea, apologies! Hope you'll manage to fix this.

Thanks again for the "hotline"!

Have a nice day!

JoshOBrien commented 2 years ago

@LafontRapnouilTristan Glad to hear that that's the likely issue. I've made some changes that should make the package now support even people who have spaces in their paths. Would you mind testing the latest version of the package after installing it like this:

if(!require(devtools)) {install.packages("devtools")}
devtools::install_github("JoshOBrien/exiftoolr")

and then letting me know how it goes?

Thanks!

LafontRapnouilTristan commented 2 years ago

@JoshOBrien Job's done!!

It works perfectly fine! Thanks again and well done!

JoshOBrien commented 2 years ago

@LafontRapnouilTristan Good to hear. Thanks again.