Closed benjaminsingleton closed 5 years ago
You are running via docker container or on a stand alone Ubuntu machine? I would check the system resources that are available leading up to that error. Is it possible the environment does not have enough memory?
I was able to get python-geosupport working in a different (more simple) docker container, so I need to continue to troubleshoot the seg fault. As you suggested, it could be possible that the environment does not have enough memory. I'll report back when I have confidence in the root cause. Thanks for the feedback.
Could you share the simple Dockerfile you got to work? I am getting the initial error, trying the exact same thing.
@bbhoss This works for me. I had to make a small change to the source code, which you can see in my fork.
FROM python:3.7-alpine
# Change version as necessary
ARG GEOSUPPORT_VERSION="18c"
RUN apk update && \
apk add bash curl git libgcc unzip && \
curl https://www1.nyc.gov/assets/planning/download/zip/data-maps/open-data/gdelx_$GEOSUPPORT_VERSION.zip -O -J -L && \
unzip gdelx_$GEOSUPPORT_VERSION.zip -d /geosupport && \
export UNZIPPED_FOLDER_NM="$(ls /geosupport/)" && \
mv /geosupport/$UNZIPPED_FOLDER_NM /geosupport/app && \
rm gdelx_$GEOSUPPORT_VERSION.zip
ENV GEOFILES="/geosupport/app/fls/" \
LD_LIBRARY_PATH="/geosupport/app/lib"
RUN pip install git+git://github.com/benjaminsingleton/python-geosupport.git
RUN apk del curl unzip
CMD ["/bin/sh"]
@benjaminsingleton You're running it on python:3.7-alpine? Or are you running on OSX?
I saw the change in your fork and it's checking if the version is in ['linux', 'darwin']
. alpine should have worked with sys.platform.startswith('linux')
without the change you made. 'darwin' is suppose to be for OSX.
@docmarionum1 You're right. You don't need to use my fork when using alpine linux. I forgot that I was trying to get the package to work on my Mac at one point.
This works:
FROM python:3.7-alpine
# Change version as necessary
ARG GEOSUPPORT_VERSION="18c"
RUN apk update && \
apk add bash curl git libgcc unzip && \
curl https://www1.nyc.gov/assets/planning/download/zip/data-maps/open-data/gdelx_$GEOSUPPORT_VERSION.zip -O -J -L && \
unzip gdelx_$GEOSUPPORT_VERSION.zip -d /geosupport && \
export UNZIPPED_FOLDER_NM="$(ls /geosupport/)" && \
mv /geosupport/$UNZIPPED_FOLDER_NM /geosupport/app && \
rm gdelx_$GEOSUPPORT_VERSION.zip
ENV GEOFILES="/geosupport/app/fls/" \
LD_LIBRARY_PATH="/geosupport/app/lib"
RUN pip install python-geosupport
RUN apk del curl unzip
CMD ["/bin/sh"]
@ishiland I was able to get the package to work on a fresh build of my Docker image. I'm honestly not sure what was the root cause of the earlier error, but I'm going to close the issue since it seems to have resolved itself.
@benjaminsingleton Did you get it working on your Mac?
Thanks for building this library - it will be extremely valuable to me once I can get it working!
When I try to run the first example in the docs, I get the following error. I am running Ubuntu 16.04.
The relevant part of the Dockerfile where I install Geosupport is as follows:
I took a look at your Dockerfile and so I ran:
The output of the tests was a segmentation fault:
Pytest gives the following output:
Any sense what might be the cause of the problem?