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

ModuleNotFoundError: No module named 'importlib_resources' when enabling tutor-mfe 17.0.1 #217

Closed
Silidrone opened this issue Jun 23, 2024 · 2 comments

Comments

@Silidrone
Copy link

Silidrone commented Jun 23, 2024

On a fresh tutor install, when I try to enable tutor-mfe 17.0.1, I get errors.
So I do:

sudo apt update
sudo apt install python3 python3-pip libyaml-dev -y
mkdir -p ~/.venvs
python3 -m venv ~/.venvs/foo
source ~/.venvs/foo/bin/activate
pip3 install "tutor[full]==17.0.0"
tutor dev launch

And then I do:

pip install tutor-mfe==17.0.1
tutor plugins enable mfe

I get

Error applying action: func=<function discover_package..load at 0x7a04f549a200> contexts=['plugins']'
Traceback (most recent call last):
File "/home/silidrone/.venvs/res4city/bin/tutor", line 8, in
sys.exit(main())
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/commands/cli.py", line 27, in main
cli() # pylint: disable=no-value-for-parameter
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/commands/plugins.py", line 142, in enable
plugins.load(plugin)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/plugins/init.py", line 111, in load
hooks.Actions.PLUGIN_LOADED.do(name)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/core/hooks/actions.py", line 116, in do
self.do_from_context(None, *args, **kwargs)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/core/hooks/actions.py", line 135, in do_from_context
callback.do(
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/core/hooks/actions.py", line 36, in do
self.func(*args, **kwargs)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutor/plugins/v1.py", line 77, in load
entrypoint.load()
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/pkg_resources/init.py", line 2465, in load
return self.resolve()
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/pkg_resources/init.py", line 2471, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/silidrone/.venvs/res4city/lib/python3.10/site-packages/tutormfe/plugin.py", line 8, in
import importlib_resources
ModuleNotFoundError: No module named 'importlib_resources'

But when I use tutor-mfe 17.0.0 it works just fine. Isn't 17.0.1 supposed to be compatible with 17.0.0 (or any other 17.x.x version for that matter)? Or is this just a direct bug in 17.0.1?

@Silidrone Silidrone changed the title ModuleNotFoundError: No module named 'importlib_resources' when using tutor-mfe 17.0.1 ModuleNotFoundError: No module named 'importlib_resources' when enabling tutor-mfe 17.0.1 Jun 23, 2024
@regisb
Copy link
Contributor

regisb commented Jun 24, 2024

This issue was fixed in tutor v17.0.2 https:/overhangio/tutor/releases/tag/v17.0.2
In general, you should always run the latest version of the major release you want. In your case, you should run pip install --upgrade 'tutor[full]>=17.0.0,<18.0.0'.

@regisb regisb closed this as completed Jun 24, 2024
@Silidrone
Copy link
Author

Thanks for the advice.

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

No branches or pull requests

2 participants