Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Click Group.resultcallback #140

Closed
pcace opened this issue Jun 14, 2022 · 5 comments
Closed

Deprecated Click Group.resultcallback #140

pcace opened this issue Jun 14, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@pcace
Copy link

pcace commented Jun 14, 2022

Describe the bug
cjio seems to not run on win11 with the following errormessage:

PS C:\Users\user> pip install 'cjio[export,reproject]'
Collecting cjio[export,reproject]
  Using cached cjio-0.7.3-py2.py3-none-any.whl (44 kB)
Requirement already satisfied: Click in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from cjio[export,reproject]) (8.1.3)
Requirement already satisfied: pyproj in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from cjio[export,reproject]) (3.2.1)
Requirement already satisfied: numpy in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from cjio[export,reproject]) (1.22.4)
Requirement already satisfied: mapbox-earcut in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from cjio[export,reproject]) (1.0.0)
Requirement already satisfied: pandas in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from cjio[export,reproject]) (1.4.2)
Requirement already satisfied: colorama in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from Click->cjio[export,reproject]) (0.4.4)
Requirement already satisfied: pytz>=2020.1 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from pandas->cjio[export,reproject]) (2022.1)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from pandas->cjio[export,reproject]) (2.8.2)
Requirement already satisfied: certifi in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from pyproj->cjio[export,reproject]) (2022.5.18.1)
Requirement already satisfied: six>=1.5 in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (from python-dateutil>=2.8.1->pandas->cjio[export,reproject]) (1.16.0)
Installing collected packages: cjio
Successfully installed cjio-0.7.3
PS C:\Users\user> cjio
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\user\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\Scripts\cjio.exe\__main__.py", line 4, in <module>
  File "c:\users\user\appdata\local\programs\python\python38\lib\site-packages\cjio\cjio.py", line 58, in <module>
    @cli.resultcallback()
AttributeError: 'Group' object has no attribute 'resultcallback'
PS C:\Users\user>

tried with python3.7, 3.8 and 3.9

cjio version
What does cjio --version print? Or did you install from a git branch?

 cjio --version
Traceback (most recent call last):
  File "c:\users\johannes\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\johannes\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Johannes\AppData\Local\Programs\Python\Python38\Scripts\cjio.exe\__main__.py", line 4, in <module>
  File "c:\users\johannes\appdata\local\programs\python\python38\lib\site-packages\cjio\cjio.py", line 58, in <module>
    @cli.resultcallback()
AttributeError: 'Group' object has no attribute 'resultcallback'

Desktop (please complete the following information):

  • OS: Windows
  • Version Windows 11
@balazsdukai balazsdukai changed the title cjio does not install on windows 11 Deprecated Click Group.resultcallback Jun 14, 2022
@balazsdukai
Copy link
Member

This affects Click >=8.1.0, see https://click.palletsprojects.com/en/8.1.x/changes/#version-8-1-0

@balazsdukai balazsdukai added the bug Something isn't working label Jun 14, 2022
@balazsdukai
Copy link
Member

@pcace as a temporary workaround you could downgrade your Click library to < 8.1.0, until cjio is upgraded with the Click API changes.

@kannes
Copy link

kannes commented Jul 8, 2022

On Ubuntu 20.04 this gave me:

$ pip install cjio
Collecting cjio
  Downloading cjio-0.7.4-py2.py3-none-any.whl (44 kB)
     |████████████████████████████████| 44 kB 2.1 MB/s 
Requirement already satisfied: Click in ./.local/lib/python3.8/site-packages (from cjio) (7.1.2)
Installing collected packages: cjio
Successfully installed cjio-0.7.4

$ cjio 
Traceback (most recent call last):
  File "/home/me/.local/bin/cjio", line 5, in <module>
    from cjio.cjio import cli
  File "/home/me/.local/lib/python3.8/site-packages/cjio/cjio.py", line 58, in <module>
    @cli.result_callback()
TypeError: 'NoneType' object is not callable

I could fix it with pip install --upgrade click which gave me click-8.1.3.
I guess cjio needs to specify a new minimum click version?

hugoledoux added a commit that referenced this issue Jul 11, 2022
seems to be an issue with ubuntu

fixes #140
@hugoledoux
Copy link
Member

hmmm, I had tested this on macOS and it works with click=8.0.3, strange.

But still forcing 8.1 in future release (b7d85c2), thanks for reporting

@kannes
Copy link

kannes commented Jul 11, 2022

Guess it happened between version 7 and that 8.1. :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants