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

wkb.loads raises excepiton on ARM #720

Closed
Xevib opened this issue May 25, 2019 · 4 comments
Closed

wkb.loads raises excepiton on ARM #720

Xevib opened this issue May 25, 2019 · 4 comments

Comments

@Xevib
Copy link

Xevib commented May 25, 2019

Description

  • On execute:
from shapely import wkb
wkb.loads("0103000020E6100000010000001100000054AF9B18A49706403014A0E38DFE44405BB54B435875064019E390F25CFE4440CC52821E1B770640005B34D932FD4440AF1C8BB42E6806404FF6A13A5BFB4440B997BFC6778006402E67CD44D4FA4440EC3614D9F987064090BEC5AFA8F94440F840E4CAD08D064058FEE1C8F0F84440B9B3662202A60640BE20E4910AFA444091C9243D6FB70640B3A4E7CD28FB4440F941AC7C19C70640D56D9ADE55FC4440D0724941C8C406402D8374A0EEFC44406E1C19885CB8064093A4AEB7CFFF4440E4F685939FA906408F2F2AD04A004540F6B148EB42A00640D388798837004540385EC504769C064068B714BDF2FE44401640552FF18A0640ECBA502BA1FE444054AF9B18A49706403014A0E38DFE4440",hex=True)

On an ARM machine I get the follwing error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xevi/.virtualenvs/osmand/lib/python3.6/site-packages/shapely/wkb.py", line 14, in loads
    return reader.read_hex(data)
  File "/home/xevi/.virtualenvs/osmand/lib/python3.6/site-packages/shapely/geos.py", line 409, in read_hex
    "Could not create geometry because of errors "
shapely.errors.WKBReadingError: Could not create geometry because of errors while reading input.

If I run the same code on my laptop it works

Expected behavior and actual behavior.

Return a shapely.geometry.polygon.Polygon

Steps to reproduce the problem.

from shapely import wkb
wkb.loads("0103000020E6100000010000001100000054AF9B18A49706403014A0E38DFE44405BB54B435875064019E390F25CFE4440CC52821E1B770640005B34D932FD4440AF1C8BB42E6806404FF6A13A5BFB4440B997BFC6778006402E67CD44D4FA4440EC3614D9F987064090BEC5AFA8F94440F840E4CAD08D064058FEE1C8F0F84440B9B3662202A60640BE20E4910AFA444091C9243D6FB70640B3A4E7CD28FB4440F941AC7C19C70640D56D9ADE55FC4440D0724941C8C406402D8374A0EEFC44406E1C19885CB8064093A4AEB7CFFF4440E4F685939FA906408F2F2AD04A004540F6B148EB42A00640D388798837004540385EC504769C064068B714BDF2FE44401640552FF18A0640ECBA502BA1FE444054AF9B18A49706403014A0E38DFE4440",hex=True)

Operating system

Linux  4.9.93-mainline-rev1 #1 SMP Tue Apr 10 09:42:40 UTC 2018 armv7l armv7l armv7l GNU/Linux

Shapely version and provenance

Shapely==1.6.4.post2 installed from pip

@snorfalorpagus
Copy link
Member

Which distro are you using?

What version of GEOS and how was it installed?

@Xevib
Copy link
Author

Xevib commented May 25, 2019

Theddistro is:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS

I supose the geos version is this:

# dpkg -l|grep geos
ii  libgeos-3.6.2:armhf               3.6.2-1build2                      armhf        Geometry engine for Geographic Information Systems - C++ Library
ii  libgeos-c1v5:armhf                3.6.2-1build2                      armhf        Geometry engine for Geographic Information Systems - C Library

@sgillies
Copy link
Contributor

The linux wheels on PyPI don't support ARM (see pypa/manylinux#84 for some background, we're using the manylinux1 docker image to build wheels). I thought that pip would prohibit you from installing them. What version of pip do you have on the ARM machine?

Since you were able to install GEOS on the ARM machine, you can uninstall shapely and reinstall using the --no-binary shapely option like this: python -m pip install --no-binary shapely shapely.

@jorisvandenbossche
Copy link
Member

I thought that pip would prohibit you from installing them. What version of pip do you have on the ARM machine?

I suppose pip already installed from source? (indeed I would think pip would not download the wheel, at least that should be the purpose of manylinux I think)

There is some effort in conda-forge to provide arm packages (see eg conda-forge/conda-smithy#1069, conda-forge/pandas-feedstock#62), which could be interesting (although they didn't build the geo stack yet)

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

No branches or pull requests

4 participants