RQGIS3 chrashed my RStudio session
Robinlovelace opened this issue · 11 comments
Session info below. Thinking it may be an issue with my setup. Regardless, QGIS3 should never cause RStudio to crash (could also be an RStudio issue):
rstudioapi::versionInfo()
#> Error: RStudio not running
system("apt list --installed | grep ^qgis", intern = TRUE)
#> [1] "qgis/bionic,now 1:3.4.8+28bionic-ubuntugis amd64 [installed]"
#> [2] "qgis-common/bionic,bionic,now 1:3.4.8+28bionic-ubuntugis all [installed,automatic]"
#> [3] "qgis-plugin-grass/bionic,now 1:3.4.8+28bionic-ubuntugis amd64 [installed]"
#> [4] "qgis-plugin-grass-common/bionic,bionic,now 1:3.4.8+28bionic-ubuntugis all [installed,automatic]"
#> [5] "qgis-provider-grass/bionic,now 1:3.4.8+28bionic-ubuntugis amd64 [installed,automatic]"
#> [6] "qgis-providers/bionic,now 1:3.4.8+28bionic-ubuntugis amd64 [installed,automatic]"
#> [7] "qgis-providers-common/bionic,bionic,now 1:3.4.8+28bionic-ubuntugis all [installed,automatic]"
system("apt list --installed | grep ^grass", intern = TRUE)
#> [1] "grass/bionic,bionic,now 7.6.1-1~bionic1 all [installed]"
#> [2] "grass-core/bionic,now 7.6.1-1~bionic1 amd64 [installed,automatic]"
#> [3] "grass-doc/bionic,bionic,now 7.6.1-1~bionic1 all [installed,automatic]"
#> [4] "grass-gui/bionic,now 7.6.1-1~bionic1 amd64 [installed,automatic]"
system("apt list --installed | grep ^python3.6", intern = TRUE)
#> [1] "python3.6/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]"
#> [2] "python3.6-dev/bionic-updates,now 3.6.7-1~18.04 amd64 [installed,automatic]"
#> [3] "python3.6-minimal/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]"
library(RQGIS3)
#> Loading required package: reticulate
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.0 (2019-04-26)
#> os Ubuntu 18.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/London
#> date 2019-05-30
#>
#> ─ Packages ──────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
#> backports 1.1.4 2019-04-10 [1] CRAN (R 3.6.0)
#> callr 3.2.0 2019-03-15 [1] standard (@3.2.0)
#> class 7.3-15 2019-01-01 [1] standard (@7.3-15)
#> classInt 0.3-3 2019-04-26 [1] CRAN (R 3.6.0)
#> cli 1.1.0 2019-03-19 [1] CRAN (R 3.5.3)
#> codetools 0.2-16 2018-12-24 [3] CRAN (R 3.5.2)
#> crayon 1.3.4 2017-09-16 [1] standard (@1.3.4)
#> DBI 1.0.0 2018-05-02 [1] CRAN (R 3.5.2)
#> desc 1.2.0 2018-05-01 [1] standard (@1.2.0)
#> devtools 2.0.2 2019-04-08 [1] CRAN (R 3.6.0)
#> digest 0.6.19 2019-05-20 [2] CRAN (R 3.6.0)
#> e1071 1.7-1 2019-03-19 [1] CRAN (R 3.5.3)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
#> fs 1.3.1 2019-05-06 [1] CRAN (R 3.6.0)
#> glue 1.3.1 2019-03-12 [1] CRAN (R 3.5.3)
#> highr 0.8 2019-03-20 [2] CRAN (R 3.5.3)
#> hms 0.4.2 2018-03-10 [1] CRAN (R 3.5.3)
#> htmltools 0.3.6 2017-04-28 [2] CRAN (R 3.5.0)
#> jsonlite 1.6 2018-12-07 [1] standard (@1.6)
#> KernSmooth 2.23-15 2015-06-29 [3] CRAN (R 3.5.0)
#> knitr 1.23 2019-05-18 [2] CRAN (R 3.6.0)
#> lattice 0.20-38 2018-11-04 [1] standard (@0.20-38)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.2)
#> Matrix 1.2-17 2019-03-22 [1] CRAN (R 3.6.0)
#> memoise 1.1.0 2017-04-21 [2] CRAN (R 3.5.0)
#> pillar 1.4.1 2019-05-28 [1] CRAN (R 3.6.0)
#> pkgbuild 1.0.3 2019-03-20 [1] standard (@1.0.3)
#> pkgconfig 2.0.2 2018-08-16 [1] standard (@2.0.2)
#> pkgload 1.0.2 2018-10-29 [2] CRAN (R 3.5.1)
#> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.3)
#> processx 3.3.1 2019-05-08 [1] CRAN (R 3.6.0)
#> ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.3)
#> R6 2.4.0 2019-02-14 [1] standard (@2.4.0)
#> raster 2.9-5 2019-05-14 [1] CRAN (R 3.6.0)
#> Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.5.3)
#> readr 1.3.1 2018-12-21 [1] CRAN (R 3.5.3)
#> remotes 2.0.4 2019-04-10 [1] CRAN (R 3.6.0)
#> reticulate * 1.12 2019-04-12 [1] CRAN (R 3.6.0)
#> rgdal 1.4-4 2019-05-29 [1] CRAN (R 3.6.0)
#> rlang 0.3.4 2019-04-07 [1] CRAN (R 3.6.0)
#> rmarkdown 1.13 2019-05-22 [2] CRAN (R 3.6.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.3)
#> RQGIS3 * 1.0.1.9000 2019-05-30 [1] Github (jannes-m/RQGIS3@35e9faa)
#> rstudioapi 0.10 2019-03-19 [1] CRAN (R 3.5.3)
#> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 3.5.1)
#> sf 0.7-4 2019-04-25 [1] CRAN (R 3.6.0)
#> sp 1.3-1 2018-06-05 [1] CRAN (R 3.5.3)
#> stringi 1.4.3 2019-03-12 [1] CRAN (R 3.5.3)
#> stringr 1.4.0 2019-02-10 [1] standard (@1.4.0)
#> testthat 2.1.1 2019-04-23 [1] CRAN (R 3.6.0)
#> tibble 2.1.2 2019-05-29 [1] CRAN (R 3.6.0)
#> units 0.6-3 2019-05-03 [1] CRAN (R 3.6.0)
#> usethis 1.5.0 2019-04-07 [2] CRAN (R 3.5.3)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.3)
#> xfun 0.7 2019-05-14 [2] CRAN (R 3.6.0)
#> yaml 2.2.0 2018-07-25 [2] CRAN (R 3.5.1)
#>
#> [1] /usr/local/lib/R/site-library
#> [2] /usr/lib/R/site-library
#> [3] /usr/lib/R/library
Created on 2019-05-30 by the reprex package (v0.3.0)
I'm on RStudio 1.2.1326 btw,
Also crashed on the latest version of RStudio, just installed.
Amazingly, it runs fine when not in RStudio. I seem to recall this issue in previous conversations with @jannes-m:
library(RQGIS3)
#> Loading required package: reticulate
set_env()
#> Assuming that your root path is '/usr'!
#> $root
#> [1] "/usr"
#>
#> $qgis_prefix_path
#> [1] "/usr/bin/qgis"
#>
#> $python_plugins
#> [1] "/usr/share/qgis/python/plugins"
find_algorithms("centroid")
#> [1] "Centroids-------------------------------------------->native:centroids"
#> [2] "Generate points (pixel centroids) along line--------->qgis:generatepointspixelcentroidsalongline"
#> [3] "Generate points (pixel centroids) inside polygons---->qgis:generatepointspixelcentroidsinsidepolygons"
#> [4] "Polygon centroids------------------------------------>saga:polygoncentroids"
Created on 2019-05-30 by the reprex package (v0.3.0)
Session info
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.0 (2019-04-26)
#> os Ubuntu 18.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/London
#> date 2019-05-30
#>
#> ─ Packages ──────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
#> backports 1.1.4 2019-04-10 [1] CRAN (R 3.6.0)
#> callr 3.2.0 2019-03-15 [1] standard (@3.2.0)
#> class 7.3-15 2019-01-01 [1] standard (@7.3-15)
#> classInt 0.3-3 2019-04-26 [1] CRAN (R 3.6.0)
#> cli 1.1.0 2019-03-19 [1] CRAN (R 3.5.3)
#> codetools 0.2-16 2018-12-24 [3] CRAN (R 3.5.2)
#> crayon 1.3.4 2017-09-16 [1] standard (@1.3.4)
#> DBI 1.0.0 2018-05-02 [1] CRAN (R 3.5.2)
#> desc 1.2.0 2018-05-01 [1] standard (@1.2.0)
#> devtools 2.0.2 2019-04-08 [1] CRAN (R 3.6.0)
#> digest 0.6.19 2019-05-20 [2] CRAN (R 3.6.0)
#> e1071 1.7-1 2019-03-19 [1] CRAN (R 3.5.3)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
#> fs 1.3.1 2019-05-06 [1] CRAN (R 3.6.0)
#> glue 1.3.1 2019-03-12 [1] CRAN (R 3.5.3)
#> highr 0.8 2019-03-20 [2] CRAN (R 3.5.3)
#> hms 0.4.2 2018-03-10 [1] CRAN (R 3.5.3)
#> htmltools 0.3.6 2017-04-28 [2] CRAN (R 3.5.0)
#> jsonlite 1.6 2018-12-07 [1] standard (@1.6)
#> KernSmooth 2.23-15 2015-06-29 [3] CRAN (R 3.5.0)
#> knitr 1.23 2019-05-18 [2] CRAN (R 3.6.0)
#> lattice 0.20-38 2018-11-04 [1] standard (@0.20-38)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.2)
#> Matrix 1.2-17 2019-03-22 [1] CRAN (R 3.6.0)
#> memoise 1.1.0 2017-04-21 [2] CRAN (R 3.5.0)
#> pillar 1.4.1 2019-05-28 [1] CRAN (R 3.6.0)
#> pkgbuild 1.0.3 2019-03-20 [1] standard (@1.0.3)
#> pkgconfig 2.0.2 2018-08-16 [1] standard (@2.0.2)
#> pkgload 1.0.2 2018-10-29 [2] CRAN (R 3.5.1)
#> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.3)
#> processx 3.3.1 2019-05-08 [1] CRAN (R 3.6.0)
#> ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.3)
#> R6 2.4.0 2019-02-14 [1] standard (@2.4.0)
#> raster 2.9-5 2019-05-14 [1] CRAN (R 3.6.0)
#> Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.5.3)
#> readr 1.3.1 2018-12-21 [1] CRAN (R 3.5.3)
#> remotes 2.0.4 2019-04-10 [1] CRAN (R 3.6.0)
#> reticulate * 1.12 2019-04-12 [1] CRAN (R 3.6.0)
#> rgdal 1.4-4 2019-05-29 [1] CRAN (R 3.6.0)
#> rlang 0.3.4 2019-04-07 [1] CRAN (R 3.6.0)
#> rmarkdown 1.13 2019-05-22 [2] CRAN (R 3.6.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.3)
#> RQGIS3 * 1.0.1.9000 2019-05-30 [1] Github (jannes-m/RQGIS3@35e9faa)
#> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 3.5.1)
#> sf 0.7-4 2019-04-25 [1] CRAN (R 3.6.0)
#> sp 1.3-1 2018-06-05 [1] CRAN (R 3.5.3)
#> stringi 1.4.3 2019-03-12 [1] CRAN (R 3.5.3)
#> stringr 1.4.0 2019-02-10 [1] standard (@1.4.0)
#> testthat 2.1.1 2019-04-23 [1] CRAN (R 3.6.0)
#> tibble 2.1.2 2019-05-29 [1] CRAN (R 3.6.0)
#> units 0.6-3 2019-05-03 [1] CRAN (R 3.6.0)
#> usethis 1.5.0 2019-04-07 [2] CRAN (R 3.5.3)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.3)
#> xfun 0.7 2019-05-14 [2] CRAN (R 3.6.0)
#> yaml 2.2.0 2018-07-25 [2] CRAN (R 3.5.1)
#>
#> [1] /usr/local/lib/R/site-library
#> [2] /usr/lib/R/site-library
#> [3] /usr/lib/R/library
Another example, from a terminal this time:
library(RQGIS3)
Loading required package: reticulate
> set_env()
Assuming that your root path is '/usr'!
$root
[1] "/usr"
$qgis_prefix_path
[1] "/usr/bin/qgis"
$python_plugins
[1] "/usr/share/qgis/python/plugins"
> find_algorithms("clean")
/usr/share/qgis/python/plugins/processing/algs/help/__init__.py:46: YAMLLoadWarning:
calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
/usr/share/qgis/python/plugins/processing/algs/help/__init__.py:46: YAMLLoadWarning:
calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
/usr/share/qgis/python/plugins/processing/gui/wrappers.py:1757: DeprecationWarning:
invalid escape sequence \A
/usr/share/qgis/python/plugins/processing/gui/wrappers.py:1772: DeprecationWarning:
invalid escape sequence \A
[1] "v.clean---------------------------------------------->grass7:v.clean"
>
I can reproduce this behavior. Also running on Ubuntu 18.04-LTS.
It seems hard to debug. @jannes-m am I right in thinking that your recommended work-around is to use our docker image? I recall we added QGIS to a version of the Dockerfile, the main one IIRC.
Yes, RQGIS3 and Rstudio work in harmony in the geocompr Docker image and under Windows. Another way would be to use R from the cli.
Hello @jannes-m, I did not want to create a new issue for this because it is probably very straightforward but I am unable to move forward. I could find help anywhere else hence asking the question here so sorry for the hassle.
My issue is that I am unable to install RQGIS3 on my machine. First it asked me to install Rtools which I did and then I tried a number of ways to try and install RQGIS3 but it says that the plugin doesn't exist.
I don't remember facing this issue whilst installing/working with RQGIS (older plugin). For reference, I am using a Windows 10 64 bit machine. Any help would be greatly appreciated. Thanks
Can you install Docker? That is an alternative way to get it working.
Thanks @Robinlovelace , I managed to somehow get it to install. Let's see if I'm able to get it to work finally. :)