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

"cimported module has no attribute" when compiling with Cython 3.0 #62

Open
oliche opened this issue Nov 22, 2023 · 1 comment
Open

Comments

@oliche
Copy link
Contributor

oliche commented Nov 22, 2023

Hello,

I was trying a fresh installation of datoviz and couldn't compile using ./manage.sh cython

Here is an excerpt of the otherwise very long and repetitive error message

Error compiling Cython file:
------------------------------------------------------------
...
    elif dt == cv.DVZ_EVENT_MOUSE_WHEEL:
        x = c_ev.u.w.pos[0]
        y = c_ev.u.w.pos[1]
        dx = c_ev.u.w.dir[0]
        dy = c_ev.u.w.dir[1]
        modifiers = _get_modifiers(c_ev.u.w.modifiers)
                                       ^
------------------------------------------------------------

datoviz/pydatoviz.pyx:517:39: Cannot select attribute of incomplete type 'DvzEvent'

Error compiling Cython file:
------------------------------------------------------------
...


# TODO: add more keys
_KEYS = {
    cv.DVZ_KEY_LEFT: 'left',
    cv.DVZ_KEY_RIGHT: 'right',
      ^
------------------------------------------------------------

datoviz/pydatoviz.pyx:55:6: cimported module has no attribute 'DVZ_KEY_RIGHT'

This was fixed by downgrading cython to 0.29.36 in this manner:
pip install Cython==0.29.36

If this is reproducible on other machines and not a weird configuration on my end, I suggest pinning the cython version until the build recipe is compatible with Cython 3 +

@rossant
Copy link
Contributor

rossant commented Nov 23, 2023

Thank you for the report @oliche ! Pinning seems like a good idea since this branch is not going to last long now.

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

2 participants