PyOpenGL TypeError in glutCreateWindow

在使用PyOpenGL的时候,出现以下错误

Traceback (most recent call last):
  File "viewer.py", line 80, in 
    viewer = Viewer()
  File "viewer.py", line 19, in __init__
    self.init_interface()
  File "viewer.py", line 31, in init_interface
    glutCreateWindow('3D Modeller')
  File "D:\python\lib\site-packages\OpenGL\GLUT\special.py", line 73, in glutCreateWindow
    return __glutCreateWindowWithExit(title, _exitfunc)
ctypes.ArgumentError: argument 1: : wrong type

之后在StackOverflow上找到解决办法
原因是Python3默认给出的是Unicode

你可能感兴趣的:(PyOpenGL TypeError in glutCreateWindow)