Opened 16 months ago

Last modified 12 months ago

#2145 new defect

R Jupyter demo Fails

Reported by: darkblueb Owned by: osgeolive@…
Priority: normal Milestone: OSGeoLive14.0
Component: OSGeoLive Keywords: R, sf
Cc:

Description

Steps to reproduce:

  • boot Live13 a2
  • start the Jupyter system
  • run the R Notebook
  • execute each cell
library('sf') #SimpleFeature Library to handle shapefiles

  Linking to GEOS 3.7.0, GDAL 2.4.0, PROJ 5.2.0

  Package: sf
  Version: 0.7-4
  Title: Simple Features for R

The demo dot-shp file loads properly, but the first call to display data fails.

ERROR while rich displaying an object: Error in loadNamespace(name): there is no package called ‘geojsonio’

Traceback:
1. FUN(X[[i]], ...)
2. tryCatch(withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr)) 
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler), error = outer_handler)
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. doTryCatch(return(expr), name, parentenv, handler)
6. withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr)) 
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler)
7. repr::mime2repr[[mime]](obj)
8. repr_geojson.sf(obj)
9. repr_geojson(geojsonio::geojson_list(obj), ...)
10. geojsonio::geojson_list
11. getExportedValue(pkg, name)
12. asNamespace(ns)
13. getNamespace(ns)
14. tryCatch(loadNamespace(name), error = function(e) stop(e))
15. tryCatchList(expr, classes, parentenv, handlers)
16. tryCatchOne(expr, names, parentenv, handlers[[1L]])
17. value[[3L]](cond)

An attempt to separately load geojsonio fails in multiple ways

> install.packages('geojsonio')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘hms’, ‘BH’, ‘protolite’, ‘rgdal’, ‘rgeos’, ‘maptools’, ‘readr’, ‘V8’, ‘geojson’, ‘jqr’
...

trying URL 'https://cloud.r-project.org/src/contrib/geojson_0.3.2.tar.gz'
...
trying URL 'https://cloud.r-project.org/src/contrib/geojsonio_0.7.0.tar.gz'
...

Attachments (2)

jupyter_ir_o13_debug.txt.bz2 (12.2 KB) - added by darkblueb 15 months ago.
jupyter_ir_o12_debug.txt.bz2 (11.2 KB) - added by darkblueb 15 months ago.

Download all attachments as: .zip

Change history (9)

comment:1 Changed 16 months ago by wildintellect

I looked into this a while back when you mentioned it. If I recall Jupyter has it's own code for printing/plotting which adds the geojsonio package dependency. From the initial list provided, V8 does have a system dependency of 'libv8-dev or libnode-dev'

Can you provide all the errors when trying to install geojsonio? That should tell us if any of the other packages are missing system libraries.

comment:2 Changed 15 months ago by darkblueb

attaching two DEBUG logs, one from o12 (works), the second from o13 (fails)

duplicate of ticket #2134

Changed 15 months ago by darkblueb

Changed 15 months ago by darkblueb

comment:3 Changed 15 months ago by darkblueb

previous comment by wildintellect

The cause is the IRKernel specifies that geojsonio package is used to display various things from sf objects. This is specific to Jupyter. Easiest solution is to add the geojsonio R library and it's dependencies. Not sure how much space this will take. This does include need to add the system V8 library.

sudo apt-get install libv8-dev

https://github.com/IRkernel/repr/search?q=geojsonio&unscoped_q=geojsonio

comment:4 Changed 15 months ago by darkblueb

Can you provide all the errors when trying to install geojsonio? That should tell us if any of the other packages are missing system libraries.

per the attached DEBUG logs, R modules rgdal and rgeos are not installed at all in the working osgeolive 12 final edition. It seems a bad indicator that rgdal and rgeos are being queued for install, as if this method of installation is wholly out of synch with the current setup.

comment:5 Changed 15 months ago by darkblueb

osgeolive beta1 / sf 0.7-6 ; does draw, albeit with long warning text; sf team on the topic, will update status here

comment:6 Changed 15 months ago by darkblueb

Priority: criticalnormal

comment:7 Changed 12 months ago by kalxas

Milestone: OSGeoLive13.0OSGeoLive14.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.