makeabilitylab / makeabilitylabwebsite

The Makeability Lab website
https://makeabilitylab.cs.washington.edu
MIT License
8 stars 66 forks source link

ModuleNotFoundError: No module named 'ckeditor' #866

Closed jonfroehlich closed 4 years ago

jonfroehlich commented 4 years ago

I as trying to get my Windows dev environment setup in Docker to work on the website a bit and ran into this error (so the website won't run):

website_1  | ModuleNotFoundError: No module named 'ckeditor'
website_1  | Starting server
website_1  | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f16d01d86a8>
website_1  | Traceback (most recent call last):
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
website_1  |     fn(*args, **kwargs)
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
website_1  |     autoreload.raise_last_exception()
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 248, in raise_last_exception
website_1  |     raise _exception[1]
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 337, in execute
website_1  |     autoreload.check_errors(django.setup)()
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
website_1  |     fn(*args, **kwargs)
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
website_1  |     apps.populate(settings.INSTALLED_APPS)
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 89, in populate
website_1  |     app_config = AppConfig.create(entry)
website_1  |   File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 90, in create
website_1  |     module = import_module(entry)
website_1  |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
website_1  |     return _bootstrap._gcd_import(name[level:], package, level)
website_1  |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
website_1  |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
website_1  |   File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
website_1  | ModuleNotFoundError: No module named 'ckeditor'
jonfroehlich commented 4 years ago

I just forced the Docker image to rebuild (using a no-cache flag) and I got the same error: docker build --no-cache . -t makelab_image

Strangely, it seems like django-ckeditor is both being downloaded and installed correctly. Full log here:

Step 9/14 : RUN pip install -r requirements.txt
 ---> Running in 9c0180238d7a
Collecting django==2.1.15 (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/ff/82/55a696532518aa47666b45480b579a221638ab29d60d33ce71fcbd3cef9a/Django-2.1.15-py3-none-any.whl (7.3MB)
Collecting psycopg2<3.0,>=2.7 (from -r requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/a8/8f/1c5690eebf148d1d1554fc00ccf9101e134636553dbb75bdfef4f85d7647/psycopg2-2.8.5.tar.gz (380kB)
Collecting djangorestframework (from -r requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/be/5b/9bbde4395a1074d528d6d9e0cc161d3b99bd9d0b2b558ca919ffaa2e0068/djangorestframework-3.11.0-py3-none-any.whl (911kB)
Collecting beautifulsoup4 (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/66/25/ff030e2437265616a1e9b25ccc864e0371a0bc3adb7c5a404fd661c6f4f6/beautifulsoup4-4.9.1-py3-none-any.whl (115kB)
Collecting wand==0.4.4 (from -r requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/c5/0e/4c7846ffac7a478578ff77c93d6aff3da2c181972d9447c74bfe1e87ac06/Wand-0.4.4.tar.gz (65kB)
Collecting bibtexparser==1.0.1 (from -r requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/35/71/209bae42db6cc230ffd126dbda7ec057dd69a084acb4ddcd9ab4544c4506/bibtexparser-1.0.1.tar.gz (43kB)
Collecting Pillow==6.2.0 (from -r requirements.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/34/b7/fb24ad352b747340ec1975c84c30cca37bb93a0079e037d1f0930afd65ad/Pillow-6.2.0-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)
Collecting django-extensions==2.0.7 (from -r requirements.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/d4/b5/f141b351b49db2cb4c855cd8adbdb98cc49f3944a924ddfe51790bb46402/django_extensions-2.0.7-py2.py3-none-any.whl (217kB)
Collecting django-image-cropping==1.2.0 (from -r requirements.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/20/88/4bdd2f4f8e3463127a6014f70ba9cb975adad7556c369170ef2bc30a9372/django-image-cropping-1.2.0.tar.gz (43kB)
Collecting django-sortedm2m==1.5.0 (from -r requirements.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/70/54/3eaf25cdefdd4ea82a68537428f41536a086dc2200662ae55253d4a96c1f/django-sortedm2m-1.5.0.tar.gz
Collecting easy_thumbnails==2.5 (from -r requirements.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/5a/50/15211bfae0096feced4b97c69e76f01758c6ceac802ee468f7d478d43c5d/easy-thumbnails-2.5.tar.gz (67kB)
Collecting xmltodict==0.11.0 (from -r requirements.txt (line 14))
  Downloading https://files.pythonhosted.org/packages/42/a9/7e99652c6bc619d19d58cdd8c47560730eb5825d43a7e25db2e1d776ceb7/xmltodict-0.11.0-py2.py3-none-any.whl
Collecting google-api-python-client==1.5.3 (from -r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/36/5f/d322736f5f19bb3ea4947eea0667b03c08b4294e27d47b5c8851d01cd417/google_api_python_client-1.5.3-py2.py3-none-any.whl (50kB)
Collecting pyOpenSSL (from -r requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53kB)
Collecting requests (from -r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl (61kB)
Collecting django-sortedm2m-filter-horizontal-widget (from -r requirements.txt (line 18))
  Downloading https://files.pythonhosted.org/packages/eb/f3/8d2ee3f866a9b04959aafd96d731506c2ad433c48f2ca99f6f5602905f5a/django-sortedm2m-filter-horizontal-widget-1.3.2.tar.gz (41kB)
Collecting django-ckeditor (from -r requirements.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/2d/fe/993c3328b8821134d8468939e59b4ef2238749474f39a378d66d7db70a42/django_ckeditor-5.9.0-py2.py3-none-any.whl (2.4MB)
Collecting pytz (from django==2.1.15->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/4f/a4/879454d49688e2fad93e59d7d4efda580b783c745fd2ec2a3adf87b0808d/pytz-2020.1-py2.py3-none-any.whl (510kB)
Collecting soupsieve>1.2 (from beautifulsoup4->-r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/6f/8f/457f4a5390eeae1cc3aeab89deb7724c965be841ffca6cfca9197482e470/soupsieve-2.0.1-py3-none-any.whl
Collecting pyparsing (from bibtexparser==1.0.1->-r requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67kB)
Collecting future (from bibtexparser==1.0.1->-r requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
Collecting six>=1.2 (from django-extensions==2.0.7->-r requirements.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting django-appconf>=1.0.2 (from django-image-cropping==1.2.0->-r requirements.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/72/fe/1fa374775fb853c6a075f301eeb48e9069460e03f4d3c3d5502fb1b4a766/django_appconf-1.0.4-py2.py3-none-any.whl
Collecting uritemplate<1,>=0.6 (from google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/5a/6d/66aed916219c1a25e12a01457ea5442f80e54ed3844ef688b25e20dada5f/uritemplate-0.6.tar.gz
Collecting httplib2<1,>=0.8 (from google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/b3/ad/d9d9331850ea5bd4f5cb8c650c0bfa119a4abd6b0ad7c45b6506bc979fc0/httplib2-0.18.1-py3-none-any.whl (95kB)
Collecting oauth2client<4.0.0,>=1.5.0 (from google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/c0/7b/bc893e35d6ca46a72faa4b9eaac25c687ce60e1fbe978993fe2de1b0ff0d/oauth2client-3.0.0.tar.gz (77kB)
Collecting cryptography>=2.8 (from pyOpenSSL->-r requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/58/95/f1282ca55649b60afcf617e1e2ca384a2a3e7a5cf91f724cf83c8fbe76a1/cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl (2.7MB)
Collecting idna<3,>=2.5 (from requests->-r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
Collecting chardet<4,>=3.0.2 (from requests->-r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting certifi>=2017.4.17 (from requests->-r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->-r requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl (126kB)
Collecting django-js-asset>=1.2.2 (from django-ckeditor->-r requirements.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/aa/2d/98089cf51c8e83bc70723021390b94a3638a4a0ce30a47e2e70476b2095d/django_js_asset-1.2.2-py2.py3-none-any.whl
Collecting simplejson>=2.5.0 (from uritemplate<1,>=0.6->google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/98/87/a7b98aa9256c8843f92878966dc3d8d914c14aad97e2c5ce4798d5743e07/simplejson-3.17.0.tar.gz (83kB)
Collecting pyasn1>=0.1.7 (from oauth2client<4.0.0,>=1.5.0->google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
Collecting pyasn1-modules>=0.0.5 (from oauth2client<4.0.0,>=1.5.0->google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
Collecting rsa>=3.1.4 (from oauth2client<4.0.0,>=1.5.0->google-api-python-client==1.5.3->-r requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/1c/df/c3587a667d6b308fadc90b99e8bc8774788d033efcc70f4ecaae7fad144b/rsa-4.6-py3-none-any.whl (47kB)
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.8->pyOpenSSL->-r requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/ff/1d/0b743dadcdf4980b717163fd2d24cd18c1c0c7a78a076268afd7e0e2c25e/cffi-1.14.0-cp37-cp37m-manylinux1_x86_64.whl (400kB)
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.8->pyOpenSSL->-r requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
Building wheels for collected packages: psycopg2, wand, bibtexparser, django-image-cropping, django-sortedm2m, easy-thumbnails, django-sortedm2m-filter-horizontal-widget, future, uritemplate, oauth2client, simplejson
  Running setup.py bdist_wheel for psycopg2: started
  Running setup.py bdist_wheel for psycopg2: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/fb/85/a8/57f24b92b9554880384d00a84881c0ea80cbcee02d6dcede54
  Running setup.py bdist_wheel for wand: started
  Running setup.py bdist_wheel for wand: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/69/27/bf/e3a7915d1ac83745a9486cb50f1cb0d676cc8642ae711193a6
  Running setup.py bdist_wheel for bibtexparser: started
  Running setup.py bdist_wheel for bibtexparser: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/24/18/e4/3fd8f11c4b6cf9fc1d8722930f7add093b7899252218c7e989
  Running setup.py bdist_wheel for django-image-cropping: started
  Running setup.py bdist_wheel for django-image-cropping: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/ae/80/0b/2b1c032372a28dd2abb7a7a2aea5aff88d1e21b200fcd399fe
  Running setup.py bdist_wheel for django-sortedm2m: started
  Running setup.py bdist_wheel for django-sortedm2m: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/db/ec/fe/845bb9faacc680f8692bd97a032a917664237eaf815f116ca0
  Running setup.py bdist_wheel for easy-thumbnails: started
  Running setup.py bdist_wheel for easy-thumbnails: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/63/61/15/7b2e4c823212f6e88efc4bb20898a6a9661686bb5029f72900
  Running setup.py bdist_wheel for django-sortedm2m-filter-horizontal-widget: started
  Running setup.py bdist_wheel for django-sortedm2m-filter-horizontal-widget: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/0a/1c/50/07f39ad4d57afd2293dee6994ed8b046f221fe69a800a4f2da
  Running setup.py bdist_wheel for future: started
  Running setup.py bdist_wheel for future: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e
  Running setup.py bdist_wheel for uritemplate: started
  Running setup.py bdist_wheel for uritemplate: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/ef/52/69/a981189772ffed6caaa6b442172d5e343493f85dd881051aef
  Running setup.py bdist_wheel for oauth2client: started
  Running setup.py bdist_wheel for oauth2client: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/48/f7/87/b932f09c6335dbcf45d916937105a372ab14f353a9ca431d7d
  Running setup.py bdist_wheel for simplejson: started
  Running setup.py bdist_wheel for simplejson: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/86/c0/83/dcd0339abb2640544bb8e0938aab2d069cef55e5647ce6e097
Successfully built psycopg2 wand bibtexparser django-image-cropping django-sortedm2m easy-thumbnails django-sortedm2m-filter-horizontal-widget future uritemplate oauth2client simplejson
Installing collected packages: pytz, django, psycopg2, djangorestframework, soupsieve, beautifulsoup4, wand, pyparsing, future, bibtexparser, Pillow, six, django-extensions, django-appconf, django-image-cropping, django-sortedm2m, easy-thumbnails, xmltodict, simplejson, uritemplate, httplib2, pyasn1, pyasn1-modules, rsa, oauth2client, google-api-python-client, pycparser, cffi, cryptography, pyOpenSSL, idna, chardet, certifi, urllib3, requests, django-sortedm2m-filter-horizontal-widget, django-js-asset, django-ckeditor
Successfully installed Pillow-6.2.0 beautifulsoup4-4.9.1 bibtexparser-1.0.1 certifi-2020.6.20 cffi-1.14.0 chardet-3.0.4 cryptography-2.9.2 django-2.1.15 django-appconf-1.0.4 django-ckeditor-5.9.0 django-extensions-2.0.7 django-image-cropping-1.2.0 django-js-asset-1.2.2 django-sortedm2m-1.5.0 django-sortedm2m-filter-horizontal-widget-1.3.2 djangorestframework-3.11.0 easy-thumbnails-2.5 future-0.18.2 google-api-python-client-1.5.3 httplib2-0.18.1 idna-2.10 oauth2client-3.0.0 psycopg2-2.8.5 pyOpenSSL-19.1.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pyparsing-2.4.7 pytz-2020.1 requests-2.24.0 rsa-4.6 simplejson-3.17.0 six-1.15.0 soupsieve-2.0.1 uritemplate-0.6 urllib3-1.25.9 wand-0.4.4 xmltodict-0.11.0

Notice that it says successfully built and installed django-ckeditor...

When I actually look at the installed list of Python modules in the Docker container (Stackoverflow), I don't see ckeditor:

docker exec f3110762a021 pip list
Package                                   Version
----------------------------------------- ---------
asn1crypto                                0.24.0
beautifulsoup4                            4.8.0
bibtexparser                              1.0.1
certifi                                   2019.6.16
cffi                                      1.12.3
chardet                                   3.0.4
cryptography                              2.7
Django                                    2.1.7
django-appconf                            1.0.3
django-extensions                         2.0.7
django-image-cropping                     1.2.0
django-sortedm2m                          1.5.0
django-sortedm2m-filter-horizontal-widget 1.3.2
djangorestframework                       3.10.2
easy-thumbnails                           2.5
future                                    0.17.1
google-api-python-client                  1.5.3
httplib2                                  0.13.1
idna                                      2.8
oauth2client                              3.0.0
Pillow                                    5.2.0
pip                                       18.1
psycopg2                                  2.8.3
pyasn1                                    0.4.6
pyasn1-modules                            0.2.6
pycparser                                 2.19
pyOpenSSL                                 19.0.0
pyparsing                                 2.4.2
pytz                                      2019.2
requests                                  2.22.0
rsa                                       4.0
setuptools                                40.4.3
simplejson                                3.16.0
six                                       1.12.0
soupsieve                                 1.9.3
uritemplate                               0.6
urllib3                                   1.25.3
Wand                                      0.4.4
wheel                                     0.32.1
xmltodict                                 0.11.0
jonfroehlich commented 4 years ago

Making some progress.

docker container ls
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                      NAMES
002e5ea949fa        makeabilitylabwebsite_website   "./docker-entrypoint…"   8 minutes ago       Up 6 minutes        127.0.0.1:8571->8000/tcp   makeabilitylabwebsite_website_1
192c3e4f541b        postgres                        "docker-entrypoint.s…"   8 minutes ago       Up 6 minutes        0.0.0.0:32778->5432/tcp    makeabilitylabwebsite_db_1

First, I created an interactive Docker shell as the root user (root is crucial or you can't install anything):

> docker exec -u root -it 002e5ea949fa /bin/bash

Second, from that shell I ran pip list and noticed that ckeditor was still not installed. So, I tried it manually:

docker exec -u root -it 002e5ea949fa /bin/bash
root@002e5ea949fa:/code# pip install django-ckeditor
Collecting django-ckeditor
  Downloading https://files.pythonhosted.org/packages/2d/fe/993c3328b8821134d8468939e59b4ef2238749474f39a378d66d7db70a42/django_ckeditor-5.9.0-py2.py3-none-any.whl (2.4MB)
    100% |████████████████████████████████| 2.4MB 3.1MB/s
Collecting django-js-asset>=1.2.2 (from django-ckeditor)
  Downloading https://files.pythonhosted.org/packages/aa/2d/98089cf51c8e83bc70723021390b94a3638a4a0ce30a47e2e70476b2095d/django_js_asset-1.2.2-py2.py3-none-any.whl
Installing collected packages: django-js-asset, django-ckeditor
Successfully installed django-ckeditor-5.9.0 django-js-asset-1.2.2
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

From within the shell, I was then able to get the webserver to run:

root@a6931375dccf:/code# python3 manage.py runserver 0.0.0.0:8000
Performing system checks...

System check identified some issues:

WARNINGS:
website.News.project: (fields.W340) null has no effect on ManyToManyField.
website.Poster.authors: (fields.W340) null has no effect on ManyToManyField.
website.Poster.projects: (fields.W340) null has no effect on ManyToManyField.
website.Project.keywords: (fields.W340) null has no effect on ManyToManyField.
website.Project.project_umbrellas: (fields.W340) null has no effect on ManyToManyField.
website.Project.sponsors: (fields.W340) null has no effect on ManyToManyField.
website.Project_umbrella.keywords: (fields.W340) null has no effect on ManyToManyField.
website.Publication.keywords: (fields.W340) null has no effect on ManyToManyField.
website.Publication.project_umbrellas: (fields.W340) null has no effect on ManyToManyField.
website.Publication.projects: (fields.W340) null has no effect on ManyToManyField.
website.Talk.keywords: (fields.W340) null has no effect on ManyToManyField.
website.Talk.project_umbrellas: (fields.W340) null has no effect on ManyToManyField.
website.Talk.projects: (fields.W340) null has no effect on ManyToManyField.
website.Talk.speakers: (fields.W340) null has no effect on ManyToManyField.

System check identified 14 issues (0 silenced).
July 02, 2020 - 12:18:27
Django version 2.1.7, using settings 'makeabilitylab.settings'
Starting development server at http://0.0.0.0:8000/

However, I cannot rerun docker-compose up because, when I do, obviously the installations that I just made are no longer there...

jonfroehlich commented 4 years ago

OK, strangely, I got this to work and I'm not sure how. I made two edits to the Dockerfile:

First, I upgraded pip by adding:

RUN pip install --upgrade pip 

Second, I added this line after RUN pip install -r requirements.txt:

## TEMP related to: https://github.com/jonfroehlich/makeabilitylabwebsite/issues/866
RUN pip install django-ckeditor

Interestingly, the Docker output was:

Step 11/16 : RUN pip install django-ckeditor
 ---> Running in 2e6ffa63b3a2
Requirement already satisfied: django-ckeditor in /usr/local/lib/python3.7/site-packages (5.9.0)
Requirement already satisfied: django-js-asset>=1.2.2 in /usr/local/lib/python3.7/site-packages (from django-ckeditor) (1.2.2)
Removing intermediate container 2e6ffa63b3a2
jonfroehlich commented 4 years ago

Ha, I commented out those lines and than reran everything and it still worked!

docker build --no-cache . -t makelab_image
docker-compose up

Craziness!

jonfroehlich commented 4 years ago

I'm gonna close this now but hopefully it might be useful to us in the future...

jonfroehlich commented 4 years ago

Reopening. OK, so, the reason why it worked was because we installed ck-editor via the shell (https://github.com/jonfroehlich/makeabilitylabwebsite/issues/866#issuecomment-653177905). None of the changes I mentioned here (https://github.com/jonfroehlich/makeabilitylabwebsite/issues/866#issuecomment-653183863) mattered, which is why when I commented them out in the Dockerfile, it still worked.

So, the question is, why isn't ckeditor getting installed correctly via requirements.txt even though it looks like it is!

It's like I'm using a different image or something...

jonfroehlich commented 4 years ago

OK, so, I think the 'using a different image' thought is on the right track. When I run docker images, I see that the makeabilitylabwebsite_website was last created 10 months ago...

image

jonfroehlich commented 4 years ago

OK, I figured it out. On Windows, we have to use docker-compose build to build the image...

Fatih90FM91 commented 2 years ago

Building on the Heroku-20 stack -----> Determining which buildpack to use for this app -----> Python app detected -----> No Python version was specified. Using the buildpack default: python-3.10.4 To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes -----> Installing python-3.10.4 -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0 -----> Installing SQLite3 -----> Installing requirements with pip Collecting psycopg2-binary==2.9.3 Downloading psycopg2_binary-2.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB) Collecting attrs==19.3.0 Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB) Collecting bpython==0.18 Downloading bpython-0.18-py2.py3-none-any.whl (183 kB) Collecting Django==2.2.12 Downloading Django-2.2.12-py3-none-any.whl (7.5 MB) Collecting gunicorn==20.0.4 Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB) Collecting virtualenv==20.14.0 Downloading virtualenv-20.14.0-py2.py3-none-any.whl (8.8 MB) Collecting click==7.1.2 Downloading click-7.1.2-py2.py3-none-any.whl (82 kB) Collecting Flask==1.1.2 Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB) Collecting itsdangerous==1.1.0 Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB) Collecting Jinja2==2.11.3 Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB) Collecting MarkupSafe==1.1.1 Downloading MarkupSafe-1.1.1.tar.gz (19 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting Werkzeug==1.0.1 Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB) Collecting requests Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB) Collecting curtsies>=0.1.18 Downloading curtsies-0.3.10.tar.gz (53 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting greenlet Downloading greenlet-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (155 kB) Collecting pygments Downloading Pygments-2.11.2-py3-none-any.whl (1.1 MB) Collecting six>=1.5 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting sqlparse Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB) Collecting pytz Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB) Collecting platformdirs<3,>=2 Downloading platformdirs-2.5.1-py3-none-any.whl (14 kB) Collecting distlib<1,>=0.3.1 Downloading distlib-0.3.4-py2.py3-none-any.whl (461 kB) Collecting filelock<4,>=3.2 Downloading filelock-3.6.0-py3-none-any.whl (10.0 kB) Collecting blessings>=1.5 Downloading blessings-1.7-py3-none-any.whl (18 kB) Collecting cwcwidth Downloading cwcwidth-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (52 kB) Collecting charset-normalizer~=2.0.0 Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB) Collecting idna<4,>=2.5 Downloading idna-3.3-py3-none-any.whl (61 kB) Collecting certifi>=2017.4.17 Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB) Collecting urllib3<1.27,>=1.21.1 Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB) Building wheels for collected packages: MarkupSafe, curtsies Building wheel for MarkupSafe (setup.py): started Building wheel for MarkupSafe (setup.py): finished with status 'done' Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-cp310-cp310-linux_x86_64.whl size=34027 sha256=e5efa49ffc85a764f69d29470b245827b496b5ba531e82e1b389652cf45daa43 Stored in directory: /tmp/pip-ephem-wheel-cache-5u7pf4za/wheels/a6/81/81/3fcafa7c24e4b4e25bcf383c792b343e53c38e6196f44bc3e3 Building wheel for curtsies (pyproject.toml): started Building wheel for curtsies (pyproject.toml): finished with status 'done' Created wheel for curtsies: filename=curtsies-0.3.10-py3-none-any.whl size=35215 sha256=aa57c4b068787fd3bd101992806b6f3ab0c770df58e6c97d40654d9024d419fb Stored in directory: /tmp/pip-ephem-wheel-cache-5u7pf4za/wheels/7b/92/fc/c68eefe9749ed2447e1a671379c6088cc5e5bc4e8475881ff4 Successfully built MarkupSafe curtsies Installing collected packages: six, urllib3, MarkupSafe, idna, cwcwidth, charset-normalizer, certifi, blessings, Werkzeug, sqlparse, requests, pytz, pygments, platformdirs, Jinja2, itsdangerous, greenlet, filelock, distlib, curtsies, click, virtualenv, psycopg2-binary, gunicorn, Flask, Django, bpython, attrs Successfully installed Django-2.2.12 Flask-1.1.2 Jinja2-2.11.3 MarkupSafe-1.1.1 Werkzeug-1.0.1 attrs-19.3.0 blessings-1.7 bpython-0.18 certifi-2021.10.8 charset-normalizer-2.0.12 click-7.1.2 curtsies-0.3.10 cwcwidth-0.1.6 distlib-0.3.4 filelock-3.6.0 greenlet-1.1.2 gunicorn-20.0.4 idna-3.3 itsdangerous-1.1.0 platformdirs-2.5.1 psycopg2-binary-2.9.3 pygments-2.11.2 pytz-2022.1 requests-2.27.1 six-1.16.0 sqlparse-0.4.2 urllib3-1.26.9 virtualenv-20.14.0 -----> $ python manage.py collectstatic --noinput Traceback (most recent call last): File "/tmp/build_f33e365b/manage.py", line 22, in main() File "/tmp/build_f33e365b/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/init.py", line 357, in execute django.setup() File "/app/.heroku/python/lib/python3.10/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/app/.heroku/python/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/app/.heroku/python/lib/python3.10/site-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/app/.heroku/python/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'ckeditor' ! Error while running '$ python manage.py collectstatic --noinput'. See traceback above for details. You may need to update application code to resolve this error. Or, you can disable collectstatic for this application: $ heroku config:set DISABLE_COLLECTSTATIC=1 https://devcenter.heroku.com/articles/django-assets ! Push rejected, failed to compile Python app. ! Push failed

Fatih90FM91 commented 2 years ago

hi,developers continously i got this error.eventhough i remove ckeditor,it still shows up this error.could you please drop your any idea or solution about that?