plugins icon indicating copy to clipboard operation
plugins copied to clipboard

CTFd-Docker/CTFd-multi-question-plugin

Open jshufelt opened this issue 5 years ago • 3 comments

CTFd-multi-question-plugin $ python3 --version Python 3.8.6 Ubuntu 20.04

ctfd_1 | db is ready ctfd_1 | INFO [alembic.runtime.migration] Context impl MySQLImpl. ctfd_1 | INFO [alembic.runtime.migration] Will assume non-transactional DDL. ctfd_1 | Traceback (most recent call last): ctfd_1 | File "manage.py", line 14, in ctfd_1 | app = create_app() ctfd_1 | File "/opt/CTFd/CTFd/init.py", line 281, in create_app ctfd_1 | init_plugins(app) ctfd_1 | File "/opt/CTFd/CTFd/plugins/init.py", line 195, in init_plugins ctfd_1 | module = importlib.import_module(module, package="CTFd.plugins") ctfd_1 | File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module ctfd_1 | return _bootstrap._gcd_import(name[level:], package, level) ctfd_1 | File "", line 1006, in _gcd_import ctfd_1 | File "", line 983, in _find_and_load ctfd_1 | File "", line 967, in _find_and_load_unlocked ctfd_1 | File "", line 677, in _load_unlocked ctfd_1 | File "", line 728, in exec_module ctfd_1 | File "", line 219, in _call_with_frames_removed ctfd_1 | File "/opt/CTFd/CTFd/plugins/CTFd-multi-question-plugin/init.py", line 1, in ctfd_1 | from CTFd.plugins import register_plugin_assets_directory, challenges, keys ctfd_1 | ImportError: cannot import name 'keys' from 'CTFd.plugins' (/opt/CTFd/CTFd/plugins/init.py)

I have seen this bug in a couple of other plugins. In the Docker Plugin...

Traceback (most recent call last): File "serve.py", line 23, in app = create_app() File "/home/user/CTFd/CTFd/init.py", line 281, in create_app init_plugins(app) File "/home/user/CTFd/CTFd/plugins/init.py", line 195, in init_plugins module = importlib.import_module(module, package="CTFd.plugins") File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/home/user/CTFd/CTFd/plugins/CTFd-Docker/init.py", line 2, in from CTFd.utils import admins_only, is_admin, cache ImportError: cannot import name 'admins_only' from 'CTFd.utils' (/home/user/CTFd/CTFd/utils/init.py)

I am looking at the code and trying to figure out what admins_only and keys are used for.

Thanks

jshufelt avatar Jan 13 '21 01:01 jshufelt

You're using a plugin that's not supported for the latest version of ctfd. See this issue for the original plugin https://github.com/wroersma/CTFd-multi-answer/issues/11

wroersma avatar Jan 13 '21 15:01 wroersma

Is there a plan to convert the old plugins to CTFd 3.0? I am looking at the Docker code now. I think Kevin needs so help honestly. The CTF community should be pitching in.

jshufelt avatar Jan 13 '21 17:01 jshufelt

I updated ctfd-portable-challenges-plugin, I don't know where I should check it in.

jshufelt avatar Jan 15 '21 00:01 jshufelt