为什么我收到错误“无法加载外部图块集”



我只想知道如何修复我在标题中提到的错误。

我真的不知道该尝试什么,只有 3 行代码,它们正是 pytmx 文档中显示的方式......

import pygame
import pytmx
tmxdata = pytmx.TiledMap("map test pygame.tmx")

只想"加载"我创建的地图,而不会出现这个巨大的错误:

Cannot load external tileset: C:UsersWILHEMDesktopbrdl Python 3projetlabyrinthetest pygame tileset.tsx
Traceback (most recent call last):
  File "C:UsersWILHEMDesktopbrdl Python 3projetlabyrinthetestTMX.py", line 4, in <module>
    tmxdata = pytmx.TiledMap("C:/Users/WILHEM/Desktop/brdl Python 3/projet/labyrinthe/carte test pygame.tmx")
  File "C:UsersWILHEMDesktopbrdl Python 3Python37-32libsite-packagespytmxpytmx.py", line 360, in __init__
    self.parse_xml(ElementTree.parse(self.filename).getroot())
  File "C:UsersWILHEMDesktopbrdl Python 3Python37-32libsite-packagespytmxpytmx.py", line 400, in parse_xml
    self.add_tileset(TiledTileset(self, subnode))
  File "C:UsersWILHEMDesktopbrdl Python 3Python37-32libsite-packagespytmxpytmx.py", line 845, in __init__
    self.parse_xml(node)
  File "C:UsersWILHEMDesktopbrdl Python 3Python37-32libsite-packagespytmxpytmx.py", line 874, in parse_xml
    raise Exception
Exception

如果你能帮我...衷心感谢你!

from pytmx.util_pygame import load_pygame
load_pygame(filename,pixilalpha=True)

相关内容

  • 没有找到相关文章

最新更新