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
Open

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

imsamuka opened this issue May 12, 2024 · 1 comment

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.

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

No branches or pull requests

2 participants