Lỗi pyglet.gl.lib.GLException: None

Traceback (most recent call last):
  File "e:\Coding game files\SoocerwithMath.py", line 39, in <module>
    bg.blit(0, 0)
  File "c:\Users\Adminstrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\image\__init__.py", line 1616, in blit
    glInterleavedArrays(GL_T4F_V4F, 0, array)
  File "c:\Users\Adminstrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyglet\gl\lib.py", line 107, in errcheck
    raise GLException(msg)
pyglet.gl.lib.GLException: None

đây là full code:

import pyglet
window = pyglet.window.Window()
window.config.alpha_size = 8
bg = pyglet.resource.image("mainscreen.jpg")
bg.blit(0, 0)
pyglet.app.run()

Mình lấy code của bạn để chạy thử, thấy không bị báo lỗi gì hết, chỉ là nó không show cái hình lên như mong muốn thôi. (môi trường macOS).
Xong mình bỏ cái lỗi pyglet.gl.lib.GLException: None mà bạn đưa lên google, có người hỏi tương tự

Mình copy code của họ về và chạy thử, không có bị lỗi gì, như hình:

Chỗ window.clear bạn đổi thành window.clear() nha.

Bạn thử google thêm xem.

2 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?