consbio / tpkutils

ArcGIS Tile Package Utilities
Other
112 stars 28 forks source link

tpkutils is not compatible with Python 2.7 #13

Closed Roxyi closed 7 years ago

Roxyi commented 7 years ago

Hi,

I just installed tpkutils. In the command line, I typed "tpk export mbtiles test.pk test.mbtiles", and I got this "TypeError: 'uri' is an invalid keyword argument for this function" image

brendan-ward commented 7 years ago

Looks like a possible sqlite3 library version issue. What version of python are you running? Are you using the stock version of sqlite3, or a specific version?

Roxyi commented 7 years ago

@brendan-ward My python is 2.7.12 |Anaconda 4.2.0 (64-bit)| and sqlite is 3.17.0, I am new to it so I don't know what is the stock version. I just downloaded the precompiled binaries. Thanks.

brendan-ward commented 7 years ago

@Roxyi I have confirmed this is a python 2 vs python 3 issue. I built this as a python 3.5 tool (per the readme), and never tested prior versions nor targeted backward compatibility as a design goal. Is 3.x an option for you?

If python 2.7.x is your only option, I can investigate adding backward compatibility.

Roxyi commented 7 years ago

@brendan-ward Thank you!!! YES, it is the version issue. I got this fixed by using Python 3.

RuneKyndal commented 7 years ago

I had same python 2.7 Issue. and compiling / running TPK with Python3.5 was giving me this error message ` rune@server:~/map$ tpk Traceback (most recent call last): File "/usr/local/bin/tpk", line 11, in load_entry_point('tpkutils==0.5.1', 'console_scripts', 'tpk')() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2589, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2249, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2255, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 664, in _load_unlocked File "", line 634, in _load_backward_compatible File "/usr/local/lib/python3.5/dist-packages/tpkutils-0.5.1-py3.5.egg/tpkutils/cli.py", line 25, in AttributeError: module 'click' has no attribute 'group'

it was a problem with click just had to upgrade pip3 install --upgrade --force-reinstall click

Rune

brendan-ward commented 7 years ago

@RuneKyndal any chance you know the versions of click before and now after your upgrade?

I realize now I should have pinned a specific version of click in setup.py