Code Sample, a copy-pastable example if possible
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you:
http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
Now that's tricky because I cannot do it. The seg fault very much depends on the input data, and it's part of a complex app. But with some input files 2.3.0 seg fault.
Problem description
Under 2.3.0 I can get the following using python -X faulthandler
Fatal Python error: Segmentation fault
Current thread 0x00007fa0f79c4700 (most recent call first):
File "/opt/conda/lib/python3.7/site-packages/pyproj/crs.py", line 303 in __init__
File "/opt/conda/lib/python3.7/site-packages/pyproj/crs.py", line 434 in from_user_input
File "/opt/conda/lib/python3.7/site-packages/pyproj/proj.py", line 145 in __init__
File "/opt/conda/lib/python3.7/site-packages/geopandas/geoseries.py", line 304 in to_crs
File "/opt/conda/lib/python3.7/site-packages/geopandas/geodataframe.py", line 459 in to_crs
...
File "<stdin>", line 1 in <module>
Segmentation fault (core dumped)
I've downgraded to 2.2.2 and I get a Python exception of the same lines, so it might be the same thing
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
...
File "/opt/conda/lib/python3.7/site-packages/geopandas/geodataframe.py", line 459, in to_crs
geom = df.geometry.to_crs(crs=crs, epsg=epsg)
File "/opt/conda/lib/python3.7/site-packages/geopandas/geoseries.py", line 304, in to_crs
proj_in = pyproj.Proj(self.crs, preserve_units=True)
File "/opt/conda/lib/python3.7/site-packages/pyproj/proj.py", line 147, in __init__
self.crs = CRS.from_user_input(projparams if projparams is not None else kwargs)
File "/opt/conda/lib/python3.7/site-packages/pyproj/crs.py", line 435, in from_user_input
return cls(value)
File "/opt/conda/lib/python3.7/site-packages/pyproj/crs.py", line 304, in __init__
super(CRS, self).__init__(projstring)
File "pyproj/_crs.pyx", line 1308, in pyproj._crs._CRS.__init__
File "pyproj/_datadir.pyx", line 18, in pyproj._datadir.get_pyproj_context
File "/opt/conda/lib/python3.7/site-packages/pyproj/datadir.py", line 99, in get_data_dir
"Valid PROJ data directory not found. "
pyproj.exceptions.DataDirError: Valid PROJ data directory not found. Either set the path using the environmental variable PROJ_LIB or with `pyproj.datadir.set_data_dir`.
This is the same environment as I've detailed here: https://github.com/conda-forge/pyproj-feedstock/issues/47
Environment Information
after downgrade to 2.2.2
System:
python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0]
executable: /usr/bin/condapy
machine: Linux-4.15.0-1037-gcp-x86_64-with-debian-stretch-sid
PROJ:
PROJ: 6.1.1
data dir: None
Python deps:
pyproj: 2.2.2
pip: 19.2.3
setuptools: 41.2.0
Cython: None
aenum: None
at 2.3.0
System:
python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0]
executable: /usr/bin/condapy
machine: Linux-4.15.0-1037-gcp-x86_64-with-debian-stretch-sid
PROJ:
PROJ: 6.1.1
data dir: /opt/conda/share/proj
Python deps:
pyproj: 2.3.0
pip: 19.2.3
setuptools: 41.2.0
Cython: None
Installation method
Conda in a Ubuntu 16.04 Docker image.
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
conda update conda -y && \
conda config --add channels conda-forge && \
conda config --set channel_priority strict && \
conda install \
geopandas numexpr bottleneck
Conda environment information (if you installed with conda):
Environment (conda list
):
proj4 6.1.1 hc80f0dc_1 conda-forge
pyproj 2.3.0 py37h2fd02e8_0 conda-forge
Details about conda
and system ( conda info
):
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
conda version : 4.7.11
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /opt/conda (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/conda/pkgs
/root/.conda/pkgs
envs directories : /opt/conda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-1037-gcp ubuntu/16.04.6 glibc/2.23
UID:GID : 0:0
netrc file : None
offline mode : False
bug