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

Attribute Error with '_ctx' #71

Open
YuyangLeng opened this issue Dec 6, 2024 · 4 comments
Open

Attribute Error with '_ctx' #71

YuyangLeng opened this issue Dec 6, 2024 · 4 comments

Comments

@YuyangLeng
Copy link

python3.10/site-packages/moderngl_window/context/pyqt5/window.py", line 237, in resize
if self._ctx:
AttributeError: 'Window' object has no attribute '_ctx'. Did you mean: 'ctx'?

I am just testing quick start code.

@jzc6915
Copy link

jzc6915 commented Dec 10, 2024

Hello, have you solved it? I also encountered it

@cjaverliat
Copy link

Hi, for me the "solution" was to downgrade the moderngl-window dependency to 2.4.6 and use the pyglet backend instead of pyqt5.

pip install moderngl-window==2.4.6 pyglet
from aitviewer.configuration import CONFIG as C
from aitviewer.viewer import Viewer
from aitviewer.renderables.smpl import SMPLLayer

C.window_type = "pyglet"

if __name__ == "__main__":
    smpl_layer = SMPLLayer(
        model_type="smplx",
        gender="neutral",
    )

    v = Viewer()
    v.scene.add(SMPLSequence.t_pose(smpl_layer))
    v.run()

@hieunq95
Copy link

Hi, for me the "solution" was to downgrade the moderngl-window dependency to 2.4.6 and use the pyglet backend instead of pyqt5.

pip install moderngl-window==2.4.6 pyglet
from aitviewer.configuration import CONFIG as C
from aitviewer.viewer import Viewer
from aitviewer.renderables.smpl import SMPLLayer

C.window_type = "pyglet"

if __name__ == "__main__":
    smpl_layer = SMPLLayer(
        model_type="smplx",
        gender="neutral",
    )

    v = Viewer()
    v.scene.add(SMPLSequence.t_pose(smpl_layer))
    v.run()

This solves the problem. For my system (Linux), I remove the line C.window_type = "pyglet", and it works perfectly fine.
Many thanks!

@jzc6915
Copy link

jzc6915 commented Dec 11, 2024

Hi, for me the "solution" was to downgrade the moderngl-window dependency to 2.4.6 and use the pyglet backend instead of pyqt5.

pip install moderngl-window==2.4.6 pyglet
from aitviewer.configuration import CONFIG as C
from aitviewer.viewer import Viewer
from aitviewer.renderables.smpl import SMPLLayer

C.window_type = "pyglet"

if __name__ == "__main__":
    smpl_layer = SMPLLayer(
        model_type="smplx",
        gender="neutral",
    )

    v = Viewer()
    v.scene.add(SMPLSequence.t_pose(smpl_layer))
    v.run()

Thank you for your reply

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

4 participants