jason-green-io / papyri

Minecraft map item data mapping tool using Leaflet
MIT License
63 stars 9 forks source link

Setting zoomlevel crashes out #2

Closed tomas-samot closed 6 years ago

tomas-samot commented 6 years ago

When I call the below: python3 papyri.py --mcdata ~/minecraft_servers/mc/minecraft/world --output template --zoomlevel 8

I receive the following error message:


2018-02-28 23:01:18,538 Namespace(mapstats=False, mcdata='/home/tomas/minecraft_servers/mc/minecraft/world', nostitch=True, output='template', overlay=False, poi=False, zoomlevel='8')
Traceback (most recent call last):
  File "papyri.py", line 77, in <module>
    canvasSize = 2 ** (8 + args.zoomlevel)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
jason-green-io commented 6 years ago

Please pull the latest commit and see if that still persists. That bug was present a few commits ago, but should be fixed now, just looking at the section of code, the canvasSize calculation casts args.zoomlevel to an int now, should be good.

tomas-samot commented 6 years ago

I am on the newest commit. Running on Ubuntu server 16.04.4. Python 3.5.2.

jason-green-io commented 6 years ago

I hadn't actually pushed the fix when I first encountered it, oops.

Try now.

tomas-samot commented 6 years ago

Yes that works now. Thank you