SebKuzminsky / pycam

Other
338 stars 99 forks source link

OpenGL.error.GLError "invalid operation" at startup #176

Closed paulbota closed 3 years ago

paulbota commented 3 years ago

Having some issues while trying to open the GUI.

Specs:

Error:

Imported 2 items into 'tools'
Imported 2 items into 'processes'
Imported 1 items into 'bounds'
Imported 2 items into 'tasks'
Imported 1 items into 'models'
Imported STL model: 12 triangles
Imported 1 items into 'export_settings'
Traceback (most recent call last):
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 720, in paint
    self.glsetup()
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 493, in glsetup
    GLUT.glutInit()
  File "/usr/lib/python3/dist-packages/OpenGL/GLUT/special.py", line 318, in glutInit
    holder[i] = arg
TypeError: bytes or integer address expected instead of str instance

(run_gui.py:6449): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

(run_gui.py:6449): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

(run_gui.py:6449): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

(run_gui.py:6449): Gtk-CRITICAL **: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed
Storing a state revision (2/20)
Traceback (most recent call last):
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 720, in paint
    self.glsetup()
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 500, in glsetup
    GL.glShadeModel(GL.GL_SMOOTH)
  File "/usr/lib/python3/dist-packages/OpenGL/error.py", line 208, in glCheckError
    baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
    err = 1282,
    description = b'invalid operation',
    baseOperation = glShadeModel,
    cArguments = (GL_SMOOTH,)
)
Traceback (most recent call last):
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 720, in paint
    self.glsetup()
  File "/home/paulbota/Documents/pycam-proj/pycam/pycam/Plugins/OpenGLWindow.py", line 500, in glsetup
    GL.glShadeModel(GL.GL_SMOOTH)
  File "/usr/lib/python3/dist-packages/OpenGL/error.py", line 208, in glCheckError
    baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
    err = 1282,
    description = b'invalid operation',
    baseOperation = glShadeModel,
    cArguments = (GL_SMOOTH,)
)

Result of dpkg -l python-gtk2 python-gtkglext1 python-opengl | grep ^i

ii  python-gtk2      2.24.0-4ubuntu1 amd64        Python bindings for the GTK+ widget set
ii  python-gtkglext1 1.1.0-9.1       amd64        GtkGLext python bindings
ii  python-opengl    3.0.2-1         all          Python bindings to OpenGL (Python 2)
paulbota commented 3 years ago

Fixed by redoing the install on Ubuntu 18.04.