[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Problem with pytmx and tiled



Hello, 

I am new to these forums and to pygame in general. I have been trying to use
pytmx in order to load in a tiled .tmx file but I keep getting this error:

File "C:\Python32\lib\site-packages\pytmx\pytmx.py", line 258, in __init__
    self.parse_xml(ElementTree.parse(self.filename).getroot())
  File "C:\Python32\lib\site-packages\pytmx\pytmx.py", line 280, in
parse_xml
    self.add_layer(TiledTileLayer(self, subnode))
  File "C:\Python32\lib\site-packages\pytmx\pytmx.py", line 821, in __init__
    self.parse_xml(node)
  File "C:\Python32\lib\site-packages\pytmx\pytmx.py", line 864, in
parse_xml
    data = b64decode(data_node.text.strip())
  File "C:\Python32\lib\base64.py", line 83, in b64decode
    raise TypeError("expected bytes, not %s" % s.__class__.__name__)
TypeError: expected bytes, not str

I am running python 3.2.4 and pygame 3.2. The code I am trying to run is
this:

import sys, pygame, pytmx
from pygame.locals import *

tiled_map = pytmx.TiledMap("map.tmx")

Like I said, I am new to this entire interface, so could anyone help me
figure out this problem?





--
View this message in context: http://pygame-users.25799.x6.nabble.com/Problem-with-pytmx-and-tiled-tp2028.html
Sent from the pygame-users mailing list archive at Nabble.com.