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

Error when running demo? #7

Open
salahzoubi opened this issue Jan 15, 2024 · 9 comments
Open

Error when running demo? #7

salahzoubi opened this issue Jan 15, 2024 · 9 comments

Comments

@salahzoubi
Copy link

Followed all the instructions to get the environment running, I've also ran the submodules (optional) script at the start of the instructions. Whenever I try to run the demo, I get the following:

Could not import SPECTRE. Make sure you pull the repository with submodules to enable SPECTRE.
Traceback (most recent call last):
File "/home/ubuntu/inferno/inferno/models/temporal/external/SpectrePreprocessor.py", line 16, in
from spectre.src.spectre import SPECTRE
ModuleNotFoundError: No module named 'spectre'

Could not import EmoSwinModule. SWIN models will not be available. Make sure you pull the repository with submodules to enable SWIN.
Could not import EmoSwinModule. SWIN models will not be available. Make sure you pull the repository with submodules to enable SWIN.
SWIN not found, will not be able to use SWIN models
Traceback (most recent call last):
File "demos/demo_eval_talking_head_on_audio.py", line 21, in
from inferno_apps.TalkingHead.evaluation.evaluation_functions import *
File "/home/ubuntu/inferno/inferno_apps/TalkingHead/evaluation/evaluation_functions.py", line 35, in
from psbody.mesh import Mesh
File "/home/ubuntu/miniconda3/envs/work38/lib/python3.8/site-packages/psbody/mesh/init.py", line 10, in
from .meshviewer import MeshViewer, MeshViewers
File "/home/ubuntu/miniconda3/envs/work38/lib/python3.8/site-packages/psbody/mesh/meshviewer.py", line 49, in
from OpenGL import GL, GLU, GLUT
File "/home/ubuntu/miniconda3/envs/work38/lib/python3.8/site-packages/OpenGL/GLUT/init.py", line 5, in
from OpenGL.GLUT.fonts import *
File "/home/ubuntu/miniconda3/envs/work38/lib/python3.8/site-packages/OpenGL/GLUT/fonts.py", line 20, in
p = platform.getGLUTFontPointer( name )
File "/home/ubuntu/miniconda3/envs/work38/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 350, in getGLUTFontPointer
raise NotImplementedError(
NotImplementedError: Platform does not define a GLUT font retrieval function

Any suggestions where I may be going wrong?
Thank you!

@radekd91
Copy link
Owner

@salahzoubi , thanks for your interest.

SPECTRE should not be necessary to run the model so you can ignore that error.

It seems your error comes from a problem with OpenGL. This can be a tricky part and I can only provide limited assistance there.
What platform are you on? The codebase was tested on Ubuntu 20.04 with OpenGL and also on headless Ubuntu with EGL.

It appears your platform doesn't have either. What platform are you on? Is it headless? What is the value of the DISPLAY env variable?

The code won't be runnable if OpenGL is not set up properly. If you want to bypass opengl, this is doable. The code only uses it for final visualizations. You can try commenting out the import to psbody.mesh and dump the meshes in some other way.

@salahzoubi
Copy link
Author

Thanks for getting back to me so quickly @radekd91.

I'm running headless Ubuntu 20.04 (EC2 instance) with no DISPLAY variable (returns nothing since its a remote server). What would be the best course of action in this case?

@radekd91
Copy link
Owner

radekd91 commented Jan 16, 2024 via email

@salahzoubi
Copy link
Author

I see, regarding point (2), would something like -X work? And regarding point (3) which file would I be commenting the rendering import out of? I'm currently just trying to run the demo...

Will try installing EGL as a first approach.

Thanks a ton for your help!

@radekd91
Copy link
Owner

radekd91 commented Feb 2, 2024

So I pushed a small fix, please reinstall the psbody-mesh library from the following repo:

pip install git+https://github.com/radek91/mesh.git@fix/openGLunavailable

It won't enable OpenGL but at least the psbody-mesh Mesh class will work even if OpenGL fails

@cucdengjunli
Copy link

mark

@zhangliyun9120
Copy link

So I pushed a small fix, please reinstall the psbody-mesh library from the following repo:

pip install git+https://github.com/radek91/mesh.git@fix/openGLunavailable

It won't enable OpenGL but at least the psbody-mesh Mesh class will work even if OpenGL fails

the correct cmd should be "radekd91" not "radek91" ...

@Scaryplasmon
Copy link

i confirm what zhangliyun9120 suggested, thanks!

run

pip install git+https://github.com/radekd91/mesh.git@fix/openGLunavailable

to install psbody-mesh correctly

@radekd91
Copy link
Owner

Good catch, guys! Thanks. I pushed a fix

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