|
发表于 2020-2-16 17:18:50
|
显示全部楼层
不行呀,不支持 3.6.6 吗:
- Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
- Type "copyright", "credits" or "license()" for more information.
- >>>
- ================== RESTART: C:\Users\Angel\Desktop\test.py ==================
- Traceback (most recent call last):
- File "C:\Users\Angel\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\resource.py", line 607, in animation
- identity = self._cached_animations[name]
- File "C:\Users\Angel\AppData\Local\Programs\Python\Python36\lib\weakref.py", line 137, in __getitem__
- o = self.data[key]()
- KeyError: '1.gif'
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "C:\Users\Angel\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\resource.py", line 460, in file
- location = self._index[name]
- KeyError: '1.gif'
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "C:\Users\Angel\Desktop\test.py", line 3, in <module>
- sprite = pyglet.sprite.Sprite(pyglet.resource.animation("1.gif")) # 选择当前工作目录下的一张图片
- File "C:\Users\Angel\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\resource.py", line 609, in animation
- animation = pyglet.image.load_animation(name, self.file(name))
- File "C:\Users\Angel\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\resource.py", line 463, in file
- raise ResourceNotFoundException(name)
- pyglet.resource.ResourceNotFoundException: Resource "1.gif" was not found on the path. Ensure that the filename has the correct captialisation.
- >>>
复制代码 |
|