coin3d / pivy

python bindings to coin3d
ISC License
53 stars 37 forks source link

'pivy._coin' has no attribute 'delete_SoGeo' #102

Open DaveCoventry opened 1 year ago

DaveCoventry commented 1 year ago

Hi, I am getting the following error:

`dave@Tuffy:~$ python3 Python 3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import pivy Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3/dist-packages/pivy/init.py", line 30, in from .coin import SoDB, SoNodeKit, SoInteraction File "/usr/lib/python3/dist-packages/pivy/coin.py", line 40397, in class SoGeo(object): File "/usr/lib/python3/dist-packages/pivy/coin.py", line 40431, in SoGeo __swig_destroy__ = _coin.delete_SoGeo AttributeError: module 'pivy._coin' has no attribute 'delete_SoGeo'

`

OS: KDE neon 5.26 (KDE/plasma) Python 3.10.6, Qt 5.15.7, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1

looooo commented 1 year ago

I guess this is an packaging issue.

DaveCoventry commented 1 year ago

I cloned pivy and installed with cmake and make.

looooo commented 1 year ago

ok, strange. which swig version are you using? I saw recently some issues with swig 4.1.0 and pythonocc-core. Maybe this can be related.

DaveCoventry commented 1 year ago

`dave@Tuffy:~$ swig -version

SWIG Version 4.0.2

Compiled with g++ [x86_64-pc-linux-gnu]

Configured options: +pcre `

iplayfast commented 1 year ago

I just came across this as well, many of my addon modules give this error. Exact same swig version.

Another clue perhaps is python Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import pivy Traceback (most recent call last): File "", line 1, in File "/home/chris/github/pivy/build/pivy/init.py", line 30, in from .coin import SoDB, SoNodeKit, SoInteraction File "/home/chris/github/pivy/build/pivy/coin.py", line 21, in from . import _coin ImportError: cannot import name '_coin' from partially initialized module 'pivy' (most likely due to a circular import) (/home/chris/github/pivy/build/pivy/init.py)

I think it has something to do with https://github.com/coin3d/pivy/issues/103

DaveCoventry commented 1 year ago

Hi Chris,

Did you find a workaround for this issue?

looooo commented 1 year ago

It's possible that different versions of pivy causing this problem. Please check which _coin.so is used. If I can remember correctly SoGeo was added recently.