jupyter / jupyter/notebook

Kernel fails when opening a file with geopandas, but not in ipython

Open
#5,461 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

Hey all, I'm having trouble debugging this issue so I'm posting it here to see if you have any hints.

The following code results in "The kernel appears to have died. It will restart automatically." when run in `jupyter notebook` or `jupyter lab`:

```
import geopandas as gpd
x = gpd.read_file("https://data.cityofnewyork.us/api/geospatial/d3c5-ddgc?method=export&format=GeoJSON")
```

Running notebook with `jupyter notebook --debug` produces nothing extra during this crash. I don't know where to go from here.

When run from `ipython` in the exact same conda environment, it works:

```
In [11]: x.head()
Out[11]:
shape_area ... geometry
0 0.0007823067885 ... MULTIPOLYGON (((-74.18445 40.69500, -74.18449 ...
1 0.00486634037837 ... MULTIPOLYGON (((-73.82338 40.63899, -73.82277 ...
2 0.000314414156821 ... MULTIPOLYGON (((-73.84793 40.87134, -73.84725 ...
3 0.000111871946192 ... MULTIPOLYGON (((-73.97177 40.72582, -73.97179 ...
4 0.000497957489363 ... MULTIPOLYGON (((-74.17422 40.56257, -74.17349 ...
```

This notebook is being run inside of a docker container with a mounted volume, which could contribute. These are my most obviously relevant version numbers:
```
(notebooks) rapids@thomson-HP-Z8-G4-Workstation:~/notebooks$ conda list | grep notebook
# packages in environment at /home/thomson/NVIDIA/rapids-docker/compose/etc/conda/cuda_10.0/envs/notebooks:
notebook 6.0.3 py37hc8dfbb8_0 conda-forge
(notebooks) rapids@thomson-HP-Z8-G4-Workstation:~/notebooks$ conda list | grep jupyter
jupyter-server-proxy 1.4.0 py_0 conda-forge
jupyter_client 6.1.3 py_0 conda-forge
jupyter_core 4.6.3 py37hc8dfbb8_1 conda-forge
jupyterlab 1.0.9 py37_0 conda-forge
jupyterlab-nvdashboard 0.2.0 pypi_0 pypi
jupyterlab_server 1.1.3 py_0 conda-forge
(notebooks) rapids@thomson-HP-Z8-G4-Workstation:~/notebooks$ conda list | grep geopandas
geopandas 0.7.0 py_1 conda-forge
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the geopandas.read_file call in jupyter notebook and jupyter lab, then compare it with the same call in ipython using the listed conda versions. Start with the notebook --debug entry point and the difference between notebook kernel execution and IPython; done means the kernel no longer dies or the failure is clearly identified and covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.