You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
I am encountering a NameError when attempting to use the pywavefront library, specifically when it tries to access GL_V3F from PyOpenGL. When execute 3_visualise.py. The exact error message is:
Traceback (most recent call last):
File "/home/ubuntu/murt/examples/3_visualise.py", line 2, in <module>
from murt.window import Window
File "/usr/local/lib/python3.10/dist-packages/murt/window/__init__.py", line 1, in <module>
from .mwindow as MurtWindow as Window
File "/usr/local/lib/python3.10/dist-packages/murt/window/mwindow.py", line 8, in <module>
from pywavefront import visualization, Wavefront, configure_logging
File "/home/ubuntu/.local/lib/python3.10/site-packages/pywavefront/visualization.py", line 48, in <module>
'V3F': GL_V3F,
NameError: name 'GL_V3F' is not defined
Steps to Reproduce:
Install PyOpenGL and pywavefront via pip.
Run a script that initializes an object from pywavefront which triggers the use of OpenGL constants.
The script crashes with the mentioned NameError.
Attempts to Resolve:
I have tried reinstalling both PyOpenGL and pywavefront.
Checked for any updates or dependency issues with both libraries.
Attempted to manually define the variable or modify the environment to bypass the error.
None of the above steps have resolved the issue. I suspect there might be an issue with how constants are being imported or used within the PyOpenGL or perhaps a recent update might have altered something.
Expected Outcome:
The script should execute without throwing a NameError and should correctly utilize the constants from PyOpenGL.
Any guidance or recommendations on how to fix this issue would be greatly appreciated. If there is any additional information I can provide, please let me know. Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
@danilorassis I found a related issue from this dependency package pywavefront/PyWavefront#149. Maybe you can try to reduce your pyglet version to 1.5.x? I haven't checked this project for some time, I will take a look and update some dependencies. :)
I was facing the error NameError: 'GL_V3F' is not defined when using pywavefront with PyOpenGL. With the community's help, I managed to resolve the issue by following these steps:
Uninstalled the current versions of the related libraries:
pip uninstall pywavefront PyOpenGL pyglet
Reinstalled pyglet version 1.5.x:
pip install pyglet==1.5.21
Reinstalled pywavefront and PyOpenGL:
pip install pywavefront PyOpenGL
After this, I encountered an additional error: FileNotFoundError: [Errno 2] No such file or directory: '/usr/murt-assets/ground.obj'. To resolve this, I checked if the ground.obj file was present in the specified path. Since the file was not in the expected location, I adjusted the path in my Python code to point to the correct location of the file. Here's what I did:
Manually checked if the ground.obj file was present in the /usr/murt-assets/ path:
ls /usr/murt-assets/ground.obj
Adjusted the path in the Python code in the file /usr/local/lib/python3.10/dist-packages/murt/window/mwindow.py:
Issue Description
Environment:
Problem:
I am encountering a
NameError
when attempting to use thepywavefront
library, specifically when it tries to accessGL_V3F
from PyOpenGL. When execute 3_visualise.py. The exact error message is:Steps to Reproduce:
Attempts to Resolve:
None of the above steps have resolved the issue. I suspect there might be an issue with how constants are being imported or used within the PyOpenGL or perhaps a recent update might have altered something.
Expected Outcome:
The script should execute without throwing a
NameError
and should correctly utilize the constants from PyOpenGL.Any guidance or recommendations on how to fix this issue would be greatly appreciated. If there is any additional information I can provide, please let me know. Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: