Merge pull request #8 from huooyk/fix-bug

Add exception hint
This commit is contained in:
Paul V Craven
2019-09-17 20:21:23 -05:00
committed by GitHub

View File

@@ -145,7 +145,12 @@ def _parse_data(element: etree.Element, layer_width: int) -> objects.LayerData:
Returns:
LayerData: Data object containing layer data or chunks of data.
"""
encoding = element.attrib["encoding"]
try:
encoding = element.attrib["encoding"]
except KeyError as e:
print( "The tmx_file must be encoding by csv,. base64, gzip-base64, or zlip-base64")
raise e
compression = None
try:
compression = element.attrib["compression"]