0

I just want to know how to fix the error that I mention in the title.

I really don't know what to try, there are only 3 lines of code and they are exactly how it's shown in the doc of pytmx...

import pygame
import pytmx

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

I just want to "load" the map that I create without this HUGE error:

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

If you can help me... Thank you very much from the bottom of my heart!

Valentino
  • 7,291
  • 6
  • 18
  • 34

1 Answers1

0
from pytmx.util_pygame import load_pygame

load_pygame(filename,pixilalpha=True)
surftijmen
  • 743
  • 1
  • 10
  • 27