Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'init' keyword on Proj() causing segfault #367

Closed
Thingus opened this issue Jul 8, 2019 · 10 comments
Closed

'init' keyword on Proj() causing segfault #367

Thingus opened this issue Jul 8, 2019 · 10 comments
Labels

Comments

@Thingus
Copy link

Thingus commented Jul 8, 2019

import pyproj
pyproj.Proj('EPSG:4326', preserve_units=True)  # Works
pyproj.Proj(init='EPSG:4326', preserve_units=True) # Throws segfault

Problem description

When a new Proj is instantitated, creating with the init= keyword arg throws a segfault.

Expected output

Either work as expected or throw kwargs exception? This feels related to https://pyproj4.github.io/pyproj/stable/gotchas.html
If this is a known wont-fix, please remove this report.

Environment Information

System:
python: 3.7.0 (default, Jun 28 2018, 13:15:42) [GCC 7.2.0]
executable: /home/ubuntu/tools/miniconda/bin/python
machine: Linux-4.15.0-1023-aws-x86_64-with-debian-buster-sid

PROJ:
PROJ: 6.1.0
data dir: /home/ubuntu/tools/miniconda/lib/python3.7/site-packages/pyproj/proj_dir/share/proj

Python deps:
pyproj: 2.2.1
pip: 19.1.1
setuptools: 40.2.0
Cython: None
aenum: None

Installation method

Installed from pip

Conda environment information (if you installed with conda):


Environment (conda list):
proj4                     5.0.1                h14c3975_0  
pyproj                    2.2.0                     <pip>



Details about conda and system ( conda info ):
 active environment : pyeo_env
active env location : /home/ubuntu/tools/miniconda/envs/pyeo_env
        shell level : 1
   user config file : /home/ubuntu/.condarc

populated config files :
conda version : 4.5.11
conda-build version : not installed
python version : 3.7.0.final.0
base environment : /home/ubuntu/tools/miniconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /home/ubuntu/tools/miniconda/pkgs
/home/ubuntu/.conda/pkgs
envs directories : /home/ubuntu/tools/miniconda/envs
/home/ubuntu/.conda/envs
platform : linux-64
user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Linux/4.15.0-1023-aws ubuntu/18.04 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False

@jorisvandenbossche
Copy link
Contributor

You mention you have PROJ 6.1, but the conda list output shows proj4 5.0.1. So those probably conflict, giving the segfault.

It seems you installed pyproj with pip. Can you try to remove it (pip uninstall pyproj) and then install it with conda and see if this works?

@snowman2
Copy link
Member

snowman2 commented Jul 8, 2019

The solution by @jorisvandenbossche should resolve this. But, for my curiosity sake, mind trying out: pip install http://a365fff413fe338398b6-1c8a9b3114517dc5fe17b7c3f8c63a43.r19.cf2.rackcdn.com/pyproj-2.2.2rc0-cp36-cp36m-manylinux1_x86_64.whl?

@jorisvandenbossche
Copy link
Contributor

@snowman2 Out of curiosity, what changed i the recent wheels that might have fixed this overlap with another proj install?

@snowman2
Copy link
Member

snowman2 commented Jul 8, 2019

Probably nothing. I made this change #361 and it is probably irrelevant, but I am curious.

@snowman2
Copy link
Member

snowman2 commented Jul 8, 2019

It didn't change anything. Still dumped.

@snowman2
Copy link
Member

snowman2 commented Jul 8, 2019

Seems like an issue is needed for looking into the mix of the PROJ versions.

@Thingus
Copy link
Author

Thingus commented Jul 8, 2019

The solution by @jorisvandenbossche should resolve this. But, for my curiosity sake, mind trying out: pip install http://a365fff413fe338398b6-1c8a9b3114517dc5fe17b7c3f8c63a43.r19.cf2.rackcdn.com/pyproj-2.2.2rc0-cp36-cp36m-manylinux1_x86_64.whl?

Tried this, but it's not a valid wheel for my platform.

It looks like it might be the fault of my untidy environment - I'll try @jorisvandenbossche 's solution, and then clean this up and start from scratch.

EDIT: Should mention (if it matters) this is running on the AWS Ubuntu Server instance, so it might have a slightly odd compiler configuration.

@Thingus
Copy link
Author

Thingus commented Jul 8, 2019

You mention you have PROJ 6.1, but the conda list output shows proj4 5.0.1. So those probably conflict, giving the segfault.

It seems you installed pyproj with pip. Can you try to remove it (pip uninstall pyproj) and then install it with conda and see if this works?

This resolved it - thanks.
Pyproj was installed as part of a different package - it might be a mismatch from there. I'll go look at their specification and see if it's the same problem.

@snowman2
Copy link
Member

snowman2 commented Jul 8, 2019

Closing for preference to #368

@snowman2 snowman2 closed this as completed Jul 8, 2019
@snowman2
Copy link
Member

snowman2 commented Sep 1, 2019

Fix in soon to be released 2.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants