小编Cus*_*ort的帖子

pygame.error:未设置视频模式

错误:

File "E:/advcomp/game/mainGame.py", line 3, in <module>
    from Loading import *
  File "E:\advcomp\game\Loading.py", line 37, in <module>
    gameMap = pytmx.load_pygame("gameMap.tmx", pixelalpha = True)
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\util_pygame.py", line 116, in load_pygame
    return pytmx.TiledMap(filename, *args, **kwargs)
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\pytmx.py", line 285, in __init__
    self.parse_xml(ElementTree.parse(self.filename).getroot())
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\pytmx.py", line 357, in parse_xml
    self.reload_images()
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\pytmx.py", line 429, in reload_images
    image = loader()
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\util_pygame.py", line 90, in load_image
    tile = smart_convert(tile, colorkey, pixelalpha)
  File "C:\Users\Administrator.BAC-F060-D003.000\Desktop\pythonFiles\lib\site-packages\pytmx\util_pygame.py", line 54, in smart_convert
    tile = original.convert_alpha()
pygame.error: No video mode …
Run Code Online (Sandbox Code Playgroud)

python pygame python-3.5

2
推荐指数
1
解决办法
6847
查看次数

标签 统计

pygame ×1

python ×1

python-3.5 ×1