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

pyrender.OffscreenRenderer fail #81

Open
liwenssss opened this issue Nov 18, 2019 · 5 comments
Open

pyrender.OffscreenRenderer fail #81

liwenssss opened this issue Nov 18, 2019 · 5 comments

Comments

@liwenssss
Copy link

Hello, I run a test code:

import os
os.environ['PYOPENGL_PLATFORM'] = 'osmesa'
import pyrender

pyrender.OffscreenRenderer(viewport_width=224, viewport_height=224,point_size=1.0)

and got the error:

Traceback (most recent call last):
  File "test.py", line 8, in <module>
    point_size=1.0)
  File "/home/liwensh2/.conda/envs/SPIN/lib/python3.6/site-packages/pyrender/offscreen.py", line 31, in __init__
    self._create()
  File "/home/liwensh2/.conda/envs/SPIN/lib/python3.6/site-packages/pyrender/offscreen.py", line 135, in _create
    self._platform.make_current()
  File "/home/liwensh2/.conda/envs/SPIN/lib/python3.6/site-packages/pyrender/platforms/osmesa.py", line 44, in make_current
    self.viewport_width, self.viewport_height
AssertionError

can you give me some help?Thanks!

@liwenssss
Copy link
Author

After I build omesa from source , got the same error. Need Help orz..

@nfrik
Copy link

nfrik commented Jan 4, 2020

I keep on getting the same error.

I was able to reproduce it in different Docker containers, by simply installing pyrender and libosmesa6-dev.

Traceback (most recent call last): File "pyrender_example.py", line 30, in <module> r = pyrender.OffscreenRenderer(640, 480) File "/notebooks/voca/pyrender/pyrender/offscreen.py", line 31, in __init__ self._create() File "/notebooks/voca/pyrender/pyrender/offscreen.py", line 135, in _create self._platform.make_current() File "/notebooks/voca/pyrender/pyrender/platforms/osmesa.py", line 44, in make_current self.viewport_width, self.viewport_height AssertionError

Searching on forums suggests that Mesa can't create OpenGL context.

Any help would be appreciated.

@huybery
Copy link

huybery commented Jan 17, 2020

same error, any help would be appreciated.

@lucivpav
Copy link

lucivpav commented Mar 25, 2020

In my case, the problem magically disappeared after running:

module load LLVM/6.0.0-GCCcore-7.3.0

It may be related to LLVM somehow.

@YunjieYu
Copy link

YunjieYu commented Aug 5, 2021

I am experiencing the same problem in version 0.1.45. Does anyone have solved this problem?

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

5 participants