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

'FileFinder' object has no attribute 'find_module' #736

Open
imsamuka opened this issue May 12, 2024 · 1 comment · May be fixed by #746 or #759
Open

'FileFinder' object has no attribute 'find_module' #736

imsamuka opened this issue May 12, 2024 · 1 comment · May be fixed by #746 or #759

Comments

@imsamuka
Copy link
Contributor

The engine fails to initialize with the error AttributeError: 'FileFinder' object has no attribute 'find_module'. It happens because it was deprecated, see https://docs.python.org/3/library/pkgutil.html#pkgutil.find_loader.

It can be solved easily changing this:

module = loader.find_module(name).load_module(name)

For this:

module = loader.find_spec(name).loader.load_module(name)

I think maybe there's a better way to do it(?) but I don't have much time to check it.

@FichteFoll
Copy link
Collaborator

According to #720 (comment), this is the result of a deprecation in Python 3.12 and exec_module should be used instead. I haven't taken a closer look yet.

CodingOtaku added a commit to CodingOtaku/trackma that referenced this issue Nov 16, 2024
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Jan 5, 2025
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Jan 5, 2025
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Jan 5, 2025
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Jan 5, 2025
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Jan 5, 2025
ahmubashshir added a commit to ahm-forks/trackma that referenced this issue Feb 13, 2025
@FichteFoll FichteFoll linked a pull request Feb 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants