[GH-ISSUE #454] Whiel building Docker image this message was shown: ModuleNotFoundError: No module named 'bootstrap4' #275

Closed
opened 2026-02-27 15:58:04 +03:00 by kerem · 2 comments
Owner

Originally created by @ssbaksa on GitHub (Jul 12, 2021).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/454

Hi!

I have tried to build new docker image with latest pull from GIT but error occurred.
I will paste complete message below. It seems to me that culprit for that is new requirement file with django_bootstrap5==2.0.1
while bootstrap4 is still needed.

Step 11/19 : RUN . venv/bin/activate && python3 manage.py migrate && chown -R www-data:www-data /srv/webvirtcloud
---> Running in f19a6b84a7d6
Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/apps/config.py", line 224, in create
import_module(entry)
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 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'bootstrap4'
The command '/bin/sh -c . venv/bin/activate && python3 manage.py migrate && chown -R www-data:www-data /srv/webvirtcloud' returned a non-zero code: 1

Br,

Saša

Originally created by @ssbaksa on GitHub (Jul 12, 2021). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/454 Hi! I have tried to build new docker image with latest pull from GIT but error occurred. I will paste complete message below. It seems to me that culprit for that is new requirement file with django_bootstrap5==2.0.1 while bootstrap4 is still needed. Step 11/19 : RUN . venv/bin/activate && python3 manage.py migrate && chown -R www-data:www-data /srv/webvirtcloud ---> Running in f19a6b84a7d6 Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute django.setup() File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/apps/config.py", line 224, in create import_module(entry) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'bootstrap4' The command '/bin/sh -c . venv/bin/activate && python3 manage.py migrate && chown -R www-data:www-data /srv/webvirtcloud' returned a non-zero code: 1 Br, Saša
kerem closed this issue 2026-02-27 15:58:04 +03:00
Author
Owner

@catborise commented on GitHub (Jul 12, 2021):

did you check settings.py file. there are a few changes which will break installation.

<!-- gh-comment-id:878165233 --> @catborise commented on GitHub (Jul 12, 2021): did you check settings.py file. there are a few changes which will break installation.
Author
Owner

@ssbaksa commented on GitHub (Jul 12, 2021):

Use the DIFF Luke, use the DIFF!

Only one but important. An I had even gone through source. ;-(

root@backup:~/webvirtcloud/webvirtcloud# diff settings.py settings.py.template
11c11
< SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

SECRET_KEY = ""
24c24
< "bootstrap4",


"django_bootstrap5",
<!-- gh-comment-id:878179942 --> @ssbaksa commented on GitHub (Jul 12, 2021): Use the DIFF Luke, use the DIFF! Only one but important. An I had even gone through source. ;-( root@backup:~/webvirtcloud/webvirtcloud# diff settings.py settings.py.template 11c11 < SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --- > SECRET_KEY = "" 24c24 < "bootstrap4", --- > "django_bootstrap5",
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#275
No description provided.