kylebarron / usgs-topo-tiler

Python package to read Web Mercator map tiles from USGS Historical Topographic Maps
https://kylebarron.dev/usgs-topo-mosaic
MIT License
77 stars 3 forks source link

`rio_tiler.reader` has no attribute `tile` #19

Open flynneva opened 2 years ago

flynneva commented 2 years ago

hi kyle! first off, great work and thank you for sharing your code!

running the example in the README.md I am seeing this error:

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    tile, mask = tile(url, x, y, z, tilesize=512)
  File "/home/flynn/.local/lib/python3.8/site-packages/usgs_topo_tiler/usgs_topo.py", line 72, in tile
    return reader.tile(
AttributeError: module 'rio_tiler.reader' has no attribute 'tile'

Looks like maybe rio_tiler API was changed/updated?

flynneva commented 2 years ago

I installed rio-tiler-3.0.0a6.tar.gz when I ran python3 -m pip install 'rio-tiler>=2.0a6'

flynneva commented 2 years ago

downgrading to rio-tiler==2.0a6 fixed the error 👍🏼

kylebarron commented 2 years ago

Ah, yeah when I originally was working on this, rio-tiler 2.0 hadn't been released yet, so I had to pin >=2.0a6 to force the new version. Now that 3.0 alphas exist pip finds the wrong version.