PROBLEM encountered: couldn't build and save package cache
I am currently teaching a course on spatial data analysis in R, and as a part of this course I've been showing how to use qgisprocess. However, two of the students have similar issue (see the message below) -- both use Windows; one has QGIS 3.40, the other one has QGIS 3.42; both also had other versions of QGIS on the computers before. Do you have any suggestions on how to fix it? Please let me know if you need more details on our side.
Trying getOption('qgisprocess.path'): 'C:/Program Files/QGIS 3.40.1/bin/qgis_process-qgis.bat'
Success!
Now using 'qgis_process' at 'C:/Program Files/QGIS 3.40.1/bin/qgis_process-qgis.bat'.
>>> If you need another installed QGIS instance, run `qgis_configure()`;
see `?qgis_configure` if you need to preset the path of 'qgis_process'.
QGIS version is now set to: 3.40.1-Bratislava
Using JSON for output serialization.
Using JSON for input serialization.
4 out of 4 available processing provider plugins are enabled.
ATTENTION: the QGIS algorithms could not be queried. You will loose some functionality.
You may want to (re)run `qgis_configure()`; see its documentation.
Error message was:
Error in "processx::run(\"cmd.exe\", c(\"/c\", \"call\", path, args), ...)": ! System command 'cmd.exe' failed
>>> PROBLEM encountered: couldn't build and save package cache! <<<
The 'qgis_process' command-line utility was either not found or
did not fulfil the needs to build the package cache.
Please run `qgis_configure()` to fix this and rebuild the cache.
See its documentation if you need to preset the path of qgis_process.
If the problem persists, make sure that you correctly installed QGIS
for your operating system using the instructions at
<https://download.qgis.org/>.
Hi @Nowosad. Might be QGIS installation issues of some sort, or some clash with package cache. There's a small chance that qgis_process (the backend) doesn't work perfectly in specific settings we don't know about. Did the user already run qgis_configure() again? Please return its output. If the same error remains, then also return output of qgis_path(), qgis_version(), and qgis_plugins().
More possible remedies:
- try again after disabling all plugins (if this succeeds, narrow down problem to plugin causing issue, and report in the specific plugin repo)
- try again after disabling JSON input and output (see configuration vignette for the options). This is just a workaround, not a real solution.
- remove all QGIS installations and install QGIS again, following the online QGIS installation procedure. Then don't use the
qgisprocess.pathoption in this case.
If none of these succeed, interactive debug mode of qgis_configure() or qgis_algorithms(query = TRUE) will be needed to find the culprit. If qgis_process appears to be at stake, then the problem should be reproduced in a shell environment outside of R, just using the corresponding qgis_process command.
I currently have limited bandwidth to respond quickly, but hope this may help.
Thanks @florisvdh -- I forwarded your message to the students. I will let you know when I have any reply.