cogeotiff / rio-cogeo

Cloud Optimized GeoTIFF creation and validation plugin for rasterio
https://cogeotiff.github.io/rio-cogeo/
BSD 3-Clause "New" or "Revised" License
310 stars 42 forks source link

cli bug: TypeError: __init__() got an unexpected keyword argument 'case_sensitive' #208

Closed ashnair1 closed 3 years ago

ashnair1 commented 3 years ago

When I run rio cogeo --help, I get the following error:

Usage: rio cogeo [OPTIONS]

  Warning: entry point could not be loaded. Contact its author for help.

  Traceback (most recent call last):
    File "/home/ashwin/miniconda3/lib/python3.7/site-packages/click_plugins/core.py", line 37, in decorator
      group.add_command(entry_point.load())
    File "/home/ashwin/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2450, in load
      return self.resolve()
    File "/home/ashwin/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2456, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File "/home/ashwin/miniconda3/lib/python3.7/site-packages/rio_cogeo/scripts/cli.py", line 104, in <module>
      type=click.Choice(cog_profiles.keys(), case_sensitive=False),
  TypeError: __init__() got an unexpected keyword argument 'case_sensitive'

Options:
  --help  Show this message and exit.

I'm using the latest version: 2.3.0

vincentsarago commented 3 years ago

🤔, Click documentation still show case_sensitive as a valid option 🤷

can you check which version for click you are using please?

ashnair1 commented 3 years ago

I'm using click 6.7. I'll try updating it and get back to you.

ashnair1 commented 3 years ago

That was indeed the cause. After updating, it works as expected. Thanks

kylebarron commented 3 years ago

Should we restrict click>=7.0? It's currently unrestricted

https://github.com/cogeotiff/rio-cogeo/blob/61a7e526fbdd54972236c0cf502f0c00df85a27f/setup.py#L10

vincentsarago commented 3 years ago

@ashnair1 @kylebarron I've pushed a new release to make sure we ask for click >=7.

Thanks for opening the issue @ashnair1 🙏