simonw / download-tiles

Download map tiles and store them in an MBTiles database
https://datasette.io/tools/download-tiles
Apache License 2.0
29 stars 6 forks source link

ModuleNotFoundError: No module named 'attr' #6

Closed simonw closed 3 years ago

simonw commented 3 years ago

Got this error after installing with pipx install download-tiles

inat % download-tiles --help
Traceback (most recent call last):
  File "/Users/simon/.local/bin/download-tiles", line 5, in <module>
    from download_tiles.cli import cli
  File "/Users/simon/.local/pipx/venvs/download-tiles/lib/python3.9/site-packages/download_tiles/cli.py", line 1, in <module>
    from attr import attrib
ModuleNotFoundError: No module named 'attr'
simonw commented 3 years ago

This is weird: https://github.com/simonw/download-tiles/blob/afcfec303cfe2d06d98c9596af3656e8bf0695f5/download_tiles/cli.py#L1

I don't think that line does anything and I don't know where it came from. The dependency is not installed, so this should have failed the tests.

simonw commented 3 years ago

... but pytest does depend on attrs - hence why the tests would have passed: https://github.com/pytest-dev/pytest/blob/ab2eb94054a92d5ed0daf40675032201b60035f4/setup.cfg#L44