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

Switch to importlib-metadata for compatibility with python >=3.12 #766

Open
soredake opened this issue Mar 27, 2024 · 0 comments
Open

Switch to importlib-metadata for compatibility with python >=3.12 #766

soredake opened this issue Mar 27, 2024 · 0 comments

Comments

@soredake
Copy link

More info here:
jjjake/internetarchive#621
jjjake/internetarchive#613

guessit does not work on python >=3.12 out of the box:

❯ guessit --help
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Scripts\guessit.exe\[__main__.py](http://__main__.py/)", line 4, in <module>
File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\[__init__.py](http://__init__.py/)", line 8, in <module>
from .api import guessit, GuessItApi
File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\[api.py](http://api.py/)", line 17, in <module>
from .rules import rebulk_builder
File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\rules\[__init__.py](http://__init__.py/)", line 11, in <module>
from .properties.episodes import episodes
File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\rules\properties\[episodes.py](http://episodes.py/)", line 16, in <module>
from .title import TitleFromPosition
File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\rules\properties\[title.py](http://title.py/)", line 11, in <module>
from .language import (
  File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\guessit\rules\properties\[language.py](http://language.py/)", line 10, in <module>
  import babelfish
  File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\babelfish\[__init__.py](http://__init__.py/)", line 14, in <module>
  from .converters import (LanguageConverter, LanguageReverseConverter, LanguageEquivalenceConverter, CountryConverter,
    File "C:\Users\user\AppData\Local\pipx\pipx\venvs\guessit\Lib\site-packages\babelfish\converters\[__init__.py](http://__init__.py/)", line 5, in <module>
    from pkg_resources import iter_entry_points, EntryPoint
    ModuleNotFoundError: No module named 'pkg_resources'

Workaround: pipx inject guessit setuptools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant