Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hooks not loading on python 3.13
Hooks refuse to load on python version 3.13 because of the error `AttributeError: 'FileFinder' object has no attribute 'find_module'` This patch changes find_module to importlib.import_module() to fix this issue. I have tested it using python version 3.8 and 3.13. Here is the full trace before this patch: ```py Engine: Reading config files... Data: Initializing... libanilist: Initializing... Data: Using libanilist (anime) Engine: Parsing redirection file... Engine: Scanning local library... Engine: Importing user hooks... Traceback (most recent call last): File "/usr/bin/trackma", line 8, in <module> sys.exit(main()) ~~~~^^ File "/usr/lib/python3.13/site-packages/trackma/ui/cli.py", line 1071, in main main_cmd.start() ~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/trackma/ui/cli.py", line 180, in start self.engine.start() ~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/trackma/engine.py", line 305, in start module = loader.find_module(name).load_module(name) ^^^^^^^^^^^^^^^^^^ AttributeError: 'FileFinder' object has no attribute 'find_module' ``` Co-Authored-By: FichteFoll <[email protected]>
- Loading branch information