RE-QDA / requal

Free and open-source software for computer-assisted qualitative data analysis
https://www.requal.app
Other
12 stars 1 forks source link

Installation bug #147

Closed jgires closed 1 month ago

jgires commented 1 month ago

Hello,

I can't install requal following the instructions to install the desktop version. Here is the error when I run remotes::install_local(file.choose()) :

> remotes::install_local(file.choose())
Error: Failed to install 'requal' from local:
  input string 15 is invalid
In addition: Warning message:
In gsub("[^/]", "", file_list) :
  unable to translate 'requal/.quarto/idx/wiki/Atributy-kod+<ae>r+<bb>.md.json' to a wide string
hlageek commented 1 month ago

@jgires Thanks for reporting the issue. This may be difficult to reproduce and debug from this error message alone. I suspect this may be a platform related issue. If you do not mind, please share the output from the sessionInfo() command.

But first of all, because the reference to Requal wiki in the error message is a bit unexpected, I would like to confirm that you are indeed installing this release file.

Also, for starters, you could test the installation with the two following alternatives:

remotes::install_local("your_path/to/requal_1.1.2.9002.tar.gz")

or

install.packages("your_path/to/requal_1.1.2.9002.tar.gz", repos = NULL, type="source")
jgires commented 1 month ago

Hello, thanks for your quick answer !

It's indeed the v1.1.2 I tried to install (the release file you mention).

Here's the output of sessionInfo() :

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=French_Belgium.utf8  LC_CTYPE=French_Belgium.utf8   
[3] LC_MONETARY=French_Belgium.utf8 LC_NUMERIC=C                   
[5] LC_TIME=French_Belgium.utf8    

time zone: Europe/Brussels
tzcode source: internal

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

loaded via a namespace (and not attached):
[1] compiler_4.4.1 tools_4.4.1    remotes_2.5.0 
jgires commented 1 month ago

And for your information, installation succeeded with :

devtools::install_github("RE-QDA/requal")

But impossible to install the stable repo in local.

hlageek commented 1 month ago

I appreciate the details, @jgires. I tested the installation from the file, but I cannot reproduce your error. I will try to test with your locale settings to see if that errors for me. This may be turn out to be a difficult bug to catch, but let's see. I am glad the dev version works for you ๐Ÿ‘ @skvrnami could you please test it on Windows? ๐Ÿ™

martin-hajek commented 1 month ago

I tested installing from a file in Windows and it worked fine. In my experience the problem may be a special character, e.g. รง, in the file path. You can try copying the requal file to C:\ or C:\Tmp\ and installing it from there.

jgires commented 1 month ago

The problem is the same if I put the package in C:\ if I try to install it with remotes::install_local().

But actually it works with the function install.packages().

So I think the problem is with the package remotes, perhaps because of character encoding as you say. What is the advantage of using remotes::install_local() instead of install.packages()?

hlageek commented 1 month ago

Ok, if install.packages(file.choose(), repos = NULL, type="source") works, then I think @jgires correctly pinpointed the issues as being related to remotes. In particular, remotes seems to have a difficult relationship with Windows 10 as seen here or here.

For our use case, remotes has no particular advantage over install.packages(), apart from providing a simpler syntax for installation from local files. Simple syntax is a plus for users with no previous R experience.

We therefore seem to have a problem with documentation rather than with requal itself. Perhaps adding alternative instructions to requal Windows wiki could resolve this issue?

martin-hajek commented 1 month ago

Wiki has been edited accordingly.

hlageek commented 1 month ago

Upon further digging, we do need remotes for automatically handling requal dependencies when installing from a release file. The reason why the installation with install.packages() worked was that dependencies requirements were satisified by the previous installation of requal from GitHub by the OP. On Windows, RTools is needed with remotes to install packages from source. This could possibly be the source of the issue. I suggest we close this issue when a troubleshooting note is added to documentation.

jgires commented 1 month ago

I have the last version of RTools installed, so that's not the cause of the problem.

So there is no method to directly install the stable version of the package on Windows 10? If I understand correctly, you must first go through the installation of the developing version to have the right dependencies? (or install manually the dependencies ?)

hlageek commented 1 month ago

Hi @jgires, the installation on Windows 10 from the release file via remotes should normally work as per instructions. Part of the problem with this bug is that my colleagues on Windows 10 actually cannot reproduce the error. However, I am now pursuing another angle based on your error message. Assuming it could be a character encoding issue, I need to add items to the .Rbuildignore and rebuild the installation file. If you would be willing to help and test it on your machine that would be greatly appreciated ๐Ÿ™ If this is the correct angle, then users with different locales could experience the same trouble as you, so it would be nice to get rid of this bug.

jgires commented 1 month ago

I'll be more than happy to test this on my machine!

hlageek commented 1 month ago

Great, @jgires! Thanks a lot. When you have a chance, could you please:

  1. Try remotes::install_local(file.choose()) with the original file: release file This is just to confirm that you still receive the error.
  2. Then try again with this file: requal_1.1.2.9003.tar.gz If the second file works, then great (it is rebuilt from the same commit, just cleaner), problem solved. If not, I am out of ideas ๐Ÿ˜ฌ
jgires commented 1 month ago

Same problem with the original release. But the 1.1.2.9003 works ! Thank you for your work :)

hlageek commented 1 month ago

Thank you for reporting and testing this issue @jgires! The problem was with the build, which included wiki files. I will swap the release file for the patched one and close this.