ascmitc / mhl

ASC Media Hash List
MIT License
58 stars 8 forks source link

AttributeError: 'NaturalOrderGroup' object has no attribute 'resultcallback' #127

Closed akda5id closed 2 years ago

akda5id commented 2 years ago
# ascmhl --version
  Traceback (most recent call last):
  File "/usr/local/bin/ascmhl", line 5, in <module>
    from ascmhl.cli.ascmhl import mhltool_cli
  File "/usr/local/lib/python3.8/site-packages/ascmhl/cli/ascmhl.py", line 30, in <module>
    @mhltool_cli.resultcallback()
  AttributeError: 'NaturalOrderGroup' object has no attribute 'resultcallback'

Python 3.8.13 on freebsd 13.0-RELEASE-p11. Installed from pip (ascmhl-0.9-py3-none-any.whl). Let me know if there is any further info you need to track this down, happy to help out.

llamafilm commented 2 years ago

Exact same problem here on a fresh install of macOS 12.3. My install went like this:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install fio # this gets Xcode tools installed
pip3 install --upgrade ascmhl
export PATH=~/Library/Python/3.8/bin/:$PATH
hjmallon commented 2 years ago

resultcallback should have an underscore - result_callback. At least that fixes it for me.

llamafilm commented 2 years ago

Thanks @hjmallon! I found some context at https://github.com/pallets/click/pull/1848

llamafilm commented 2 years ago

This problem happens if you run a newer version of Click. Even though the requirements.txt specifies Click==7.0, for some reason pip install ascmhl gives me version 8.1 instead. I don't understand why.

hjmallon commented 2 years ago

Setup.py has ‘Click>=7.0’ which is what pip will read

ptrpfn commented 2 years ago

Fixed with release https://github.com/ascmitc/mhl/releases/tag/v0.9.1