Bug 2117729 - [abrt] cura: init scipy.spatial._ckdtree(): _ckdtree.pyx:1:init scipy.spatial._ckdtree:ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Summary: [abrt] cura: init scipy.spatial._ckdtree(): _ckdtree.pyx:1:init scipy.spatial...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cura
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:10450b3ce0c6c0b4095813ed64e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-11 18:15 UTC by Jonathan Bangert
Modified: 2022-08-30 09:04 UTC (History)
9 users (show)

Fixed In Version: cura-4.13.1-5.fc37 cura-4.13.1-5.fc38 cura-4.13.1-5.fc35 cura-4.13.1-5.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-30 08:39:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.67 KB, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details
File: cpuinfo (2.93 KB, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details
File: environ (3.14 KB, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details
File: mountinfo (7.37 KB, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details
File: namespaces (172 bytes, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details
File: open_fds (336 bytes, text/plain)
2022-08-11 18:15 UTC, Jonathan Bangert
no flags Details

Description Jonathan Bangert 2022-08-11 18:15:37 UTC
Description of problem:
I have no idea what caused this.
Running from terminal gives this:
  File "/usr/bin/cura", line 27, in <module>
    from cura.CrashHandler import CrashHandler
  File "/usr/lib/python3.10/site-packages/cura/CrashHandler.py", line 27, in <module>
    from UM.Application import Application
  File "/usr/lib/python3.10/site-packages/UM/Application.py", line 9, in <module>
    from UM.Controller import Controller
  File "/usr/lib/python3.10/site-packages/UM/Controller.py", line 3, in <module>
    from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
  File "/usr/lib/python3.10/site-packages/UM/Scene/Iterator/DepthFirstIterator.py", line 3, in <module>
    from UM.Scene.SceneNode import SceneNode
  File "/usr/lib/python3.10/site-packages/UM/Scene/SceneNode.py", line 14, in <module>
    from UM.Mesh.MeshBuilder import MeshBuilder
  File "/usr/lib/python3.10/site-packages/UM/Mesh/MeshBuilder.py", line 4, in <module>
    from UM.Mesh.MeshData import MeshData
  File "/usr/lib/python3.10/site-packages/UM/Mesh/MeshData.py", line 16, in <module>
    import scipy.spatial
  File "/usr/lib64/python3.10/site-packages/scipy/spatial/__init__.py", line 102, in <module>
    from ._kdtree import *
  File "/usr/lib64/python3.10/site-packages/scipy/spatial/_kdtree.py", line 5, in <module>
    from ._ckdtree import cKDTree, cKDTreeNode
  File "_ckdtree.pyx", line 1, in init scipy.spatial._ckdtree
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Running fedora 36 with 5.18.16-200.fc36.x86_64 kernel
Nvidia graphics

Cura version: 1:4.13.1-2.fc36

Version-Release number of selected component:
cura-1:4.13.1-2.fc36

Additional info:
reporter:       libreport-2.17.1
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-glib-com.ultimaker.cura-10194.scope
cmdline:        /usr/bin/python3 /usr/bin/cura /home/jonathan/Downloads/labyrinthGiftBox_bottom.STL
crash_function: init scipy.spatial._ckdtree
exception_type: ValueError
executable:     /usr/bin/cura
interpreter:    python3-3.10.6-1.fc36.x86_64
kernel:         5.18.16-200.fc36.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
_ckdtree.pyx:1:init scipy.spatial._ckdtree:ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Traceback (most recent call last):
  File "/usr/bin/cura", line 27, in <module>
    from cura.CrashHandler import CrashHandler
  File "/usr/lib/python3.10/site-packages/cura/CrashHandler.py", line 27, in <module>
    from UM.Application import Application
  File "/usr/lib/python3.10/site-packages/UM/Application.py", line 9, in <module>
    from UM.Controller import Controller
  File "/usr/lib/python3.10/site-packages/UM/Controller.py", line 3, in <module>
    from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
  File "/usr/lib/python3.10/site-packages/UM/Scene/Iterator/DepthFirstIterator.py", line 3, in <module>
    from UM.Scene.SceneNode import SceneNode
  File "/usr/lib/python3.10/site-packages/UM/Scene/SceneNode.py", line 14, in <module>
    from UM.Mesh.MeshBuilder import MeshBuilder
  File "/usr/lib/python3.10/site-packages/UM/Mesh/MeshBuilder.py", line 4, in <module>
    from UM.Mesh.MeshData import MeshData
  File "/usr/lib/python3.10/site-packages/UM/Mesh/MeshData.py", line 16, in <module>
    import scipy.spatial
  File "/usr/lib64/python3.10/site-packages/scipy/spatial/__init__.py", line 102, in <module>
    from ._kdtree import *
  File "/usr/lib64/python3.10/site-packages/scipy/spatial/_kdtree.py", line 5, in <module>
    from ._ckdtree import cKDTree, cKDTreeNode
  File "_ckdtree.pyx", line 1, in init scipy.spatial._ckdtree
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Local variables in innermost frame:

Comment 1 Jonathan Bangert 2022-08-11 18:15:40 UTC
Created attachment 1905026 [details]
File: backtrace

Comment 2 Jonathan Bangert 2022-08-11 18:15:42 UTC
Created attachment 1905027 [details]
File: cpuinfo

Comment 3 Jonathan Bangert 2022-08-11 18:15:43 UTC
Created attachment 1905028 [details]
File: environ

Comment 4 Jonathan Bangert 2022-08-11 18:15:44 UTC
Created attachment 1905029 [details]
File: mountinfo

Comment 5 Jonathan Bangert 2022-08-11 18:15:45 UTC
Created attachment 1905030 [details]
File: namespaces

Comment 6 Jonathan Bangert 2022-08-11 18:15:46 UTC
Created attachment 1905031 [details]
File: open_fds

Comment 7 Nikola Forró 2022-08-22 07:01:57 UTC
Sorry, I can't reproduce this, does it still happen to you? Could you share the versions of numpy and scipy?

$ rpm -q python3-numpy python3-scipy
$ python3 -c 'import numpy, scipy; print(numpy.__version__, numpy.__file__); print(scipy.__version__, scipy.__file__)'

Thanks.

Comment 8 Jonathan Bangert 2022-08-22 14:12:10 UTC
Hi, yes cura still fails to launch with same error.

[jonathan@blackbox]~% rpm -q python3-numpy python3-scipy
python3-numpy-1.22.0-2.fc36.x86_64
python3-scipy-1.8.1-1.fc36.x86_64

[jonathan@blackbox]~% python3 -c 'import numpy, scipy; print(numpy.__version__, numpy.__file__); print(scipy.__version__, scipy.__file__)'
1.21.4 /home/jonathan/.local/lib/python3.10/site-packages/numpy/__init__.py
1.8.1 /usr/lib64/python3.10/site-packages/scipy/__init__.py

Thanks alot!

Comment 9 Miro Hrončok 2022-08-22 14:17:29 UTC
> 1.21.4 /home/jonathan/.local/lib/python3.10/site-packages/numpy/__init__.py

This sounds like you installed numpy with pip. Does this error happen if you move (backup) /home/jonathan/.local/lib/python3.10 somewhere else?

Comment 10 Nikola Forró 2022-08-22 14:19:58 UTC
Yes, as Miro says, there is a mismatch between numpy version installed as rpm from Fedora repos and numpy version in ~/.local (installed probably by pip) that gets loaded.

Comment 11 Jonathan Bangert 2022-08-22 14:22:54 UTC
Wow, yes that fixed it.
Im assuming that i should just move back the folder and uninstall numpy with pip?

Comment 12 Nikola Forró 2022-08-22 14:24:26 UTC
That should do the trick.

Comment 13 Miro Hrončok 2022-08-22 14:25:06 UTC
Does it help if you move back the folder and execute cura this way?

  python3 -s /usr/bin/cura




If so, I should probably modify /usr/bin/cura to include the -s flag.

Comment 14 Jonathan Bangert 2022-08-22 14:30:22 UTC
Yes adding the -s flag makes it work even with numpy install with pip

Comment 15 Jonathan Bangert 2022-08-22 14:36:19 UTC
Thank you so much for helping me. And for helping the entire Linux community.

Comment 17 Fedora Update System 2022-08-22 15:26:24 UTC
FEDORA-2022-d0aac6952b has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d0aac6952b

Comment 18 Fedora Update System 2022-08-22 15:28:07 UTC
FEDORA-2022-d0aac6952b has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2022-08-22 15:38:38 UTC
FEDORA-2022-80e848340d has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-80e848340d

Comment 20 Fedora Update System 2022-08-22 15:41:55 UTC
FEDORA-2022-80e848340d has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2022-08-22 16:03:35 UTC
FEDORA-2022-b28aa88b8f has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b28aa88b8f

Comment 22 Fedora Update System 2022-08-22 16:03:36 UTC
FEDORA-2022-59e178614f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-59e178614f

Comment 23 Fedora Update System 2022-08-23 01:16:34 UTC
FEDORA-2022-b28aa88b8f has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-b28aa88b8f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b28aa88b8f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2022-08-23 01:26:21 UTC
FEDORA-2022-59e178614f has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-59e178614f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-59e178614f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2022-08-30 08:39:03 UTC
FEDORA-2022-59e178614f has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2022-08-30 09:04:57 UTC
FEDORA-2022-b28aa88b8f has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.