-
Notifications
You must be signed in to change notification settings - Fork 10
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
segmentation fault when trying to fetch dataset #17
Comments
My fault, I have just downloaded the Python API via pip, yet. The command line interpreter will probably work only for a small subset of commands. |
@mika-data: Did you try to build the Python API yourself on your Debian machine? I normally build on Ubuntu, but I would think the differences are minor. |
No, I have downloaded the Python API as a whl as recommended in your installation documentation. I had previously only python3.9 on my machine, after I had build python3.6 and then build sling from source, everything seems to work for me.
|
Hmm, maybe I should test this on Python 3.9. My Ubuntu only has 3.8. |
I have tested it on another debian machine. There it worked fine:
|
So it seems to work on Python 3.8, but fail on Python 3.9, right? |
Yes, I can confirm the bug on a second machine:
|
Let me try to see if I can reproduce this on one of my own machines. |
I can now reproduce the crash. It seems to have something to do with Python type registration in the pysling C extension when running in Python 3.9. |
I seems like you need to build pysling.so using python3.9-dev for it to work with Python 3.9, so I have added support for building pysling.so for Python 3.9. You change |
When I compile from source against Python 3.10 and don't dockerize (pip/venv/...) you might get:
Sadly I don't know much C++, but isn't this just a point of permitting the type conversion? |
Are you using the newest version of the code? Line 130 of pybase.h does not match your error message. Are there any reason that you cannot use the pre-built wheel? |
I've changed pybase to:
To see the error ;) |
I'm sorry, the current sources work perfectly against Python 3.10! PS: Installed via |
@meerfrau: I use wheels instead of setuptools, so you can install SLING with the following command:
I have updated the code to support Python 3.10 by changing |
Dear author, it seems like the package installed through the wheels (pip3 install https://ringgaard.com/data/dist/sling-3.0.0-py3-none-linux_x86_64.whl) still can not correctly work with python3.9 and python3.10, which will report errors when I use these two versions of the conda environment: (test) root@2f6226b7531f:~# python3 -c "import sling; sling.which()" (test) root@2f6226b7531f:~# sling fetch --dataset caspar --overwrite But it can adequately work with python3.8. Could you please update the support for python3.10? |
It seems like there are some incompatibilities in the C extension API between python 3.8 and 3.9, so there is little hope that you can make one version which works with both. I have now added a check to tools/buildall.sh which detects the python3 version and sets the PYVER variable. This will compile a pysling.so which is compatiable with your python version. I'm in the process up upgrading my systems to Ubuntu 22, which uses python 3.10 by default. When this has been done, I will deprecate support for python versions before 3.9. In the meantime, I have made a version available that can be used with Python >= 3.9 here: https://ringgaard.com/data/dist/sling-3.0.1-py3-none-linux_x86_64.whl NB: Please notice that this version is not updated daily. |
The text was updated successfully, but these errors were encountered: