Import error: no module named django_openid_auth

Hello, I’ve got OpenEdx devstack running on gcp’s vm and followed all the instruction here. It installs perfectly. But when I tried to start the devstack using

make dev.up

it’s says all done, but when I checked the lms logs using

make logs lms

I’ve got

edx.devstack.lms     | Traceback (most recent call last):
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.lms     |     startup.run()
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/lms/startup.py", line 19, in run
edx.devstack.lms     |     django.setup()
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.lms     |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
edx.devstack.lms     |     app_config = AppConfig.create(entry)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
edx.devstack.lms     |     module = import_module(entry)
edx.devstack.lms     |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.lms     |     __import__(name)
edx.devstack.lms     | ImportError: No module named django_openid_auth
edx.devstack.studio  | Traceback (most recent call last):
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.studio  |     startup.run()
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/cms/startup.py", line 19, in run
edx.devstack.studio  |     django.setup()
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.studio  |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
edx.devstack.studio  |     app_config = AppConfig.create(entry)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
edx.devstack.studio  |     module = import_module(entry)
edx.devstack.studio  |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.studio  |     __import__(name)
edx.devstack.studio  | ImportError: No module named django_openid_auth

I tried to install it manually using pip and tried to import it via python shell and it’s imported correctly, but still it wont be imported in to the lms. I tried to run

make requirements

and still same thing happened, restarted the container several times and still not worked. Anyone can help me? what’s the problem?

here is my pip list

Package                      Version    
---------------------------- -----------
backports.ssl-match-hostname 3.5.0.1    
cached-property              1.4.2      
certifi                      2018.4.16  
chardet                      3.0.4      
Django                       1.11.23    
django-openid-auth           0.15       
docker                       3.3.0      
docker-compose               1.21.2     
docker-pycreds               0.2.3      
dockerpty                    0.4.1      
docopt                       0.6.2      
enum34                       1.1.6      
functools32                  3.2.3.post2
idna                         2.6        
ipaddress                    1.0.22     
jsonschema                   2.6.0      
pip                          19.2.3     
pkg-resources                0.0.0      
python-openid                2.2.5      
pytz                         2019.2     
PyYAML                       3.12       
requests                     2.18.4     
setuptools                   41.2.0     
six                          1.11.0     
texttable                    0.9.1      
urllib3                      1.22       
websocket-client             0.47.0     
wheel                        0.33.6
1 Like

Have you installed it in within LMS or outside ?

Your pip list is a bit shorter I think. It should have much more stuff into it.

Try installing it in the LMS.

make lms-shell
pip install your-lib

or better yet install the requirements file, so all that stuff will be installed if anything else is missing.

Okay sorry my bad, it’s a pip list from my virtualenv, here is my pip list from lms-shell

Package                       Version            Location                                                               
----------------------------- ------------------ ------------------------------------------------------------------------------
acid-xblock                   0.1                /edx/app/edxapp/venvs/edxapp/src/acid-xblock                           
activetable-xblock            0.1                /edx/app/edxapp/venvs/edxapp/src/xblock-activetable                    
alabaster                     0.7.12
amqp                          1.4.9
analytics-python              1.2.9
animation-xblock              0.1                /edx/app/edxapp/venvs/edxapp/src/animation-xblock                      
aniso8601                     7.0.0
anyjson                       0.3.3
apipkg                        1.5
appdirs                       1.4.3
argh                          0.26.2
asn1crypto                    0.24.0
astroid                       1.5.3
atomicwrites                  1.3.0
attrs                         17.4.0
audio-xblock                  0.1                /edx/app/edxapp/venvs/edxapp/src/audio-xblock                          
aws-xray-sdk                  0.95
Babel                         1.3
backports.functools-lru-cache 1.5
backports.ssl-match-hostname  3.7.0.1
backports.tempfile            1.0
backports.weakref             1.0.post1
beautifulsoup4                4.8.0
before-after                  1.0.1
billiard                      3.3.0.23
bleach                        2.1.4
bok-choy                      1.0.0
boto                          2.39.0
boto3                         1.4.8
botocore                      1.8.17
bridgekeeper                  0.6.dev10+g4e34894
calc                          0.4
caniusepython3                7.1.0
capa                          0.1                /edx/app/edxapp/edx-platform/common/lib/capa                           
celery                        3.1.25
certifi                       2019.6.16
cffi                          1.12.3
chardet                       3.0.4
chem                          1.0.0
Click                         7.0
click-log                     0.3.2
code-annotations              0.3.2
codejail                      2.0                /edx/app/edxapp/venvs/edxapp/src/codejail                              
colorama                      0.4.1
concept-xblock                0.1                /edx/app/edxapp/venvs/edxapp/src/concept-xblock                        
configparser                  3.8.1
contextlib2                   0.5.5
cookies                       2.2.1
coreapi                       2.3.3
coreschema                    0.0.4
coverage                      5.0a6
coverage-pytest-plugin        0.1
crowdsourcehinter-xblock      0.2
cryptography                  2.7
cssselect                     1.1.0
cssutils                      1.0.2
cycler                        0.10.0
ddt                           1.2.1
decorator                     4.4.0
defusedxml                    0.5.0
diff-cover                    0.9.8
distlib                       0.2.9.post0
Django                        1.11.23
django-appconf                1.0.3
django-babel                  0.6.2
django-babel-underscore       0.5.2
django-celery                 3.2.1+edx.2
django-classy-tags            0.9.0
django-config-models          1.0.1
django-cors-headers           2.1.0
django-countries              4.6.1
django-crum                   0.7.3
django-debug-toolbar          1.8
django-debug-toolbar-mongo    0.1.10             /edx/app/edxapp/venvs/edxapp/src/django-debug-toolbar-mongo            
django-fernet-fields          0.6
django-filter                 1.0.4
django-ipware                 2.1.0
django-method-override        0.1.0
django-model-utils            3.0.0
django-mptt                   0.8.7
django-multi-email-field      0.5.1
django-mysql                  2.4.1
django-oauth-plus             2.2.9.edx-2
django-oauth-toolkit          1.1.3
django-object-actions         1.1.0
django-openid-auth            0.15
django-pipeline               1.6.14
django-pyfs                   2.0
django-ratelimit              2.0.0
django-ratelimit-backend      1.1.1
django-require                1.0.11
django-sekizai                1.0.0
django-ses                    0.8.4
django-simple-history         2.7.3
django-splash                 0.2.2
django-statici18n             1.4.0
django-storages               1.4.1
django-user-tasks             0.1.7
django-waffle                 0.12.0
django-webpack-loader         0.6.0
django-wiki                   0.0.23             /edx/app/edxapp/venvs/edxapp/src/django-wiki                           
djangorestframework           3.7.7
djangorestframework-jwt       1.11.0
djangorestframework-oauth     1.1.1
djangorestframework-xml       1.4.0
docker                        4.0.2
docopt                        0.6.2
docutils                      0.15.2
done-xblock                   0.1                /edx/app/edxapp/venvs/edxapp/src/done-xblock                           
drf-yasg                      1.16.0
edx-ace                       0.1.10
edx-analytics-data-api-client 0.15.3
edx-bulk-grades               0.5.8
edx-ccx-keys                  0.2.2
edx-celeryutils               0.3.0
edx-completion                2.0.0
edx-django-oauth2-provider    1.3.5
edx-django-release-util       0.3.1
edx-django-sites-extensions   2.3.1
edx-django-utils              2.0.0
edx-drf-extensions            2.4.0
edx-enterprise                1.9.6
edx-i18n-tools                0.4.8
edx-jsme                      1.0                /edx/app/edxapp/venvs/edxapp/src/edx-jsme                              
edx-lint                      1.3.0
edx-milestones                0.2.3
edx-oauth2-provider           1.3.0
edx-opaque-keys               1.0.1
edx-organizations             2.1.0
edx-proctoring                2.0.6
edx-proctoring-proctortrack   1.0.5
edx-rbac                      1.0.2
edx-rest-api-client           1.9.2
edx-search                    1.2.2
edx-sga                       0.8.3
edx-sphinx-theme              1.5.0
edx-submissions               3.0.1
edx-user-state-client         1.1.1
edx-when                      0.3
edx-zoom                      1.2                /edx/app/edxapp/venvs/edxapp/src/edx-zoom                              
edxval                        1.1.26
elasticsearch                 1.9.0
entrypoints                   0.3
enum34                        1.1.6
event-tracking                0.2.9
execnet                       1.7.0
factory-boy                   2.8.1
Faker                         2.0.1
faulthandler                  3.1
feedparser                    5.1.3
filelock                      3.0.12
flake8                        3.7.8
flake8-polyfill               1.0.2
freezegun                     0.3.12
fs                            2.0.18
fs-s3fs                       0.1.8
funcsigs                      1.0.2
functools32                   3.2.3.post2
future                        0.17.1
futures                       3.3.0
geoip2                        2.9.0
glob2                         0.7
gunicorn                      19.9.0
help-tokens                   1.0.4
html5lib                      1.0.1
httplib2                      0.13.1
httpretty                     0.9.6
idna                          2.8
imagesize                     1.1.0
importlib-metadata            0.19
inflect                       2.1.0
inflection                    0.3.1
ipaddress                     1.0.22
isodate                       0.6.0
isort                         4.3.21
itypes                        1.1.0
Jinja2                        2.10.1
jinja2-pluralize              0.3.0
jmespath                      0.9.4
jsondiff                      1.1.1
jsonfield                     2.0.2
jsonpickle                    1.2
kiwisolver                    1.1.0
kombu                         3.0.37
laboratory                    1.0.2
lazy                          1.1
lazy-object-proxy             1.4.2
LEPL                          5.1.3
libsass                       0.10.0
loremipsum                    1.0.5
lti-consumer-xblock           1.1.8
lxml                          3.8.0
mailsnake                     1.6.4
Mako                          1.0.2
mando                         0.6.4
Markdown                      2.6.11
markey                        0.8
MarkupSafe                    1.1.1
matplotlib                    2.2.4
maxminddb                     1.4.1
mccabe                        0.6.1
mock                          1.0.1
modernize                     0.7
MongoDBProxy                  0.1.0+edx.2
mongoengine                   0.10.0
more-itertools                5.0.0
moto                          1.3.1
mpmath                        1.1.0
mysqlclient                   1.4.4
networkx                      1.7
newrelic                      5.0.2.126
nltk                          3.4.5
nodeenv                       1.1.1
numpy                         1.7.2
oauth2                        1.9.0.post1
oauthlib                      2.1.0
Open-edX                      0.11               /edx/app/edxapp/edx-platform                                           
oppia-xblock                  0.0.0              /edx/app/edxapp/venvs/edxapp/src/oppia-xblock                          
ora2                          2.2.6
packaging                     19.1
path.py                       8.2.1
pathlib2                      2.3.4
pathtools                     0.1.2
Paver                         1.3.4
pbr                           5.4.2
pdfminer.six                  20181108
piexif                        1.0.2
Pillow                        6.1.0
pip                           19.2.3
pip-tools                     3.8.0
pkgconfig                     1.5.1
pluggy                        0.12.0
polib                         1.1.0
psutil                        1.2.1
py                            1.8.0
py2neo                        3.1.2
pyaml                         19.4.1
pycodestyle                   2.5.0
PyContracts                   1.7.1
pycountry                     19.8.18
pycparser                     2.19
pycryptodome                  3.8.2
pycryptodomex                 3.4.7
pyflakes                      2.1.1
Pygments                      2.4.2
pygraphviz                    1.5
pyinotify                     0.9.6
pyjwkest                      1.3.2
PyJWT                         1.5.2
pylint                        1.7.6
pylint-celery                 0.3
pylint-django                 0.7.2
pylint-plugin-utils           0.3
pymongo                       2.9.1
pynliner                      0.8.0
pyparsing                     2.2.0
pyquery                       1.4.0
pysqlite                      2.8.3
pysrt                         1.1.1
pystache-custom               0.5.2              /edx/app/edxapp/venvs/edxapp/src/pystache-custom                       
pytest                        4.5.0
pytest-attrib                 0.1.3
pytest-cov                    2.7.1
pytest-django                 3.5.1
pytest-faulthandler           1.6.0
pytest-forked                 1.0.2
pytest-randomly               1.2.3
pytest-xdist                  1.29.0
python-dateutil               2.8.0
python-Levenshtein            0.12.0
python-memcached              1.59
python-openid                 2.2.5
python-slugify                3.0.3
python-swiftclient            3.8.0
python3-saml                  1.5.0
pytz                          2019.2
pyuca                         1.1
PyYAML                        5.1.2
radon                         3.0.3
rate-xblock                   0.1                /edx/app/edxapp/venvs/edxapp/src/rate-xblock                           
recommender-xblock            1.4.1
redis                         2.10.6
reportlab                     3.5.23
requests                      2.22.0
requests-oauthlib             1.1.0
rest-condition                1.0.3
rfc6266-parser                0.0.5.post2
ruamel.ordereddict            0.4.14
ruamel.yaml                   0.16.5
ruamel.yaml.clib              0.1.2
rules                         2.1
s3transfer                    0.1.13
safe-lxml                     1.0                /edx/app/edxapp/edx-platform/common/lib/safe_lxml                      
sailthru-client               2.2.3
sandbox-packages              0.1.1              /edx/app/edxapp/edx-platform/common/lib/sandbox-packages               
scandir                       1.10.0
schoolyourself-xblock         0.1                /edx/app/edxapp/venvs/edxapp/src/schoolyourself-xblock                 
scipy                         0.14.0
selenium                      3.141.0
semantic-version              2.6.0
setuptools                    41.2.0
Shapely                       1.6.4.post2
shortuuid                     0.5.0
simplejson                    3.16.0
singledispatch                3.4.0.3
six                           1.12.0
slumber                       0.7.1
snakefood                     1.4
snowballstemmer               1.9.0
social-auth-app-django        2.1.0
social-auth-core              1.7.0
sorl-thumbnail                12.3
sortedcontainers              2.1.0
soupsieve                     1.9.3
Sphinx                        1.8.5
sphinxcontrib-websupport      1.1.2
sqlparse                      0.3.0
staff-graded-xblock           0.5
stevedore                     1.30.1
subprocess32                  3.5.4
super-csv                     0.9.1
symmath                       0.2                /edx/app/edxapp/edx-platform/common/lib/symmath                        
sympy                         0.7.1
testfixtures                  6.10.0
text-unidecode                1.2
tincan                        0.0.5
toml                          0.10.0
tox                           3.13.2
tox-battery                   0.5.1
transifex-client              0.13.4
typing                        3.7.4.1
ubcpi-xblock                  0.6.5
unicodecsv                    0.14.1
unidiff                       0.5.5
uritemplate                   3.0.0
urllib3                       1.25.3
user-util                     0.1.5
vectordraw-xblock             0.2.1              /edx/app/edxapp/venvs/edxapp/src/xblock-vectordraw                     
virtualenv                    16.7.4
voluptuous                    0.11.7
vulture                       1.0
watchdog                      0.9.0
wcwidth                       0.1.7
web-fragments                 0.3.0
webencodings                  0.5.1
WebOb                         1.8.5
websocket-client              0.56.0
Werkzeug                      0.15.5
wheel                         0.33.6
wrapt                         1.10.5
XBlock                        1.2.3
xblock-discussion             0.1                /edx/app/edxapp/edx-platform/openedx/core/lib/xblock_builtin/xblock_discussion
xblock-drag-and-drop-v2       2.2.4
xblock-google-drive           0.1                /edx/app/edxapp/venvs/edxapp/src/xblock-google-drive                   
xblock-poll                   1.5.1
xblock-problem-builder        3.1.3
xblock-utils                  1.2.2
xmlsec                        1.3.3
xmltodict                     0.12.0
XModule                       0.1.1              /edx/app/edxapp/edx-platform/common/lib/xmodule                        
xss-utils                     0.1.1
zipp                          0.6.0

at first yes it didn’t show the django_openid_auth module, then i manually installed it , but still the log says it can’t import the module, here is my log

edx.devstack.lms     | WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
edx.devstack.lms     |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
edx.devstack.lms     |
edx.devstack.studio  | WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
edx.devstack.studio  |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
edx.devstack.studio  |
edx.devstack.lms     | Traceback (most recent call last):
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.lms     |     startup.run()
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/lms/startup.py", line 19, in run
edx.devstack.lms     |     django.setup()
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.lms     |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
edx.devstack.lms     |     app_config = AppConfig.create(entry)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
edx.devstack.lms     |     module = import_module(entry)
edx.devstack.lms     |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.lms     |     __import__(name)
edx.devstack.lms     | ImportError: No module named rest_framework_swagger
edx.devstack.studio  | Traceback (most recent call last):
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.studio  |     startup.run()
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/cms/startup.py", line 19, in run
edx.devstack.studio  |     django.setup()
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.studio  |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
edx.devstack.studio  |     app_config = AppConfig.create(entry)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
edx.devstack.studio  |     module = import_module(entry)
edx.devstack.studio  |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.studio  |     __import__(name)
edx.devstack.studio  | ImportError: No module named django_openid_auth

any advice?

Okay it solved, I just not read the logs carefully enough, it’s the devstack studio not the lms, but now I got some other errors that I don’t really understand (or should I started a new topic), here is the log from the lms

edx.devstack.lms     | 2019-08-29 03:02:04,129 WARNING 4496 [enterprise.utils] utils.py:55 - Could not import Registry from third_party_auth.provider
edx.devstack.lms     | 2019-08-29 03:02:04,129 WARNING 4496 [enterprise.utils] utils.py:56 - cannot import name _LTI_BACKENDS
edx.devstack.lms     | Traceback (most recent call last):
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.lms     |     startup.run()
edx.devstack.lms     |   File "/edx/app/edxapp/edx-platform/lms/startup.py", line 19, in run
edx.devstack.lms     |     django.setup()
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.lms     |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
edx.devstack.lms     |     app_config.import_models()
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
edx.devstack.lms     |     self.models_module = import_module(models_module_name)
edx.devstack.lms     |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.lms     |     __import__(name)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/integrated_channels/sap_success_factors/models.py", line 18, in <module>
edx.devstack.lms     |     from integrated_channels.sap_success_factors.exporters.content_metadata import SapSuccessFactorsContentMetadataExporter
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/integrated_channels/sap_success_factors/exporters/content_metadata.py", line 14, in <module>
edx.devstack.lms     |     from enterprise.views import CourseEnrollmentView
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/enterprise/views.py", line 57, in <module>
edx.devstack.lms     |     from integrated_channels.cornerstone.utils import create_cornerstone_learner_data
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/integrated_channels/cornerstone/utils.py", line 10, in <module>
edx.devstack.lms     |     from integrated_channels.cornerstone.models import CornerstoneLearnerDataTransmissionAudit
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/integrated_channels/cornerstone/models.py", line 90, in <module>
edx.devstack.lms     |     class CornerstoneEnterpriseCustomerConfiguration(EnterpriseCustomerPluginConfiguration):
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/base.py", line 318, in __new__
edx.devstack.lms     |     new_class._prepare()
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/base.py", line 375, in _prepare
edx.devstack.lms     |     class_prepared.send(sender=cls)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 193, in send
edx.devstack.lms     |     for receiver in self._live_receivers(sender)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/simple_history/models.py", line 154, in finalize
edx.devstack.lms     |     history_model = self.create_history_model(sender, inherited)
edx.devstack.lms     |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/simple_history/models.py", line 212, in create_history_model
edx.devstack.lms     |     app = apps.app_configs[model._meta.app_label]
edx.devstack.lms     | KeyError: u'cornerstone'

and this from the studio

edx.devstack.lms     | WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
edx.devstack.lms     |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
edx.devstack.lms     |
edx.devstack.studio  | WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
edx.devstack.studio  |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
edx.devstack.studio  |
edx.devstack.studio  | Traceback (most recent call last):
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/manage.py", line 120, in <module>
edx.devstack.studio  |     startup.run()
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/cms/startup.py", line 19, in run
edx.devstack.studio  |     django.setup()
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
edx.devstack.studio  |     apps.populate(settings.INSTALLED_APPS)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
edx.devstack.studio  |     app_config = AppConfig.create(entry)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
edx.devstack.studio  |     module = import_module(entry)
edx.devstack.studio  |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
edx.devstack.studio  |     __import__(name)
edx.devstack.studio  |   File "/edx/app/edxapp/edx-platform/common/djangoapps/pipeline_mako/__init__.py", line 3, in <module>
edx.devstack.studio  |     from pipeline.conf import settings
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pipeline/conf.py", line 126, in <module>
edx.devstack.studio  |     settings = PipelineSettings(_settings.PIPELINE)
edx.devstack.studio  |   File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
edx.devstack.studio  |     val = getattr(self._wrapped, name)
edx.devstack.studio  | AttributeError: 'Settings' object has no attribute 'PIPELINE'

what this KeyError: u’cornerstone’ means? and AttributeError: ‘Settings’ object has no attribute ‘PIPELINE’ this, any advice?

No idea for other errors mate. I guess you can open other topic for this.

I faced the same errors in my devstack which I fixed by doing the following:

  • Stop the devstack
$ make stop
  • Change to your edx-platform and run:
$ git checkout master
$ git pull
$ find . -name "*.pyc" -delete
  • Start the devstack again and run:
$ make lms-shell
$ paver install_prereqs
$ exit
$ make lms-restart

Let me know if it works for you.

1 Like

Are we sure about this command ?

I was just reading the post casually and saw this command and thought hey I also want to delete my .pyc files, but instead this command deleted my whole platform with all the folders and files and uncommitted changes :slightly_frowning_face:

Oh God, I’m deeply sorry.

I had an alias for this and when formatting it to post here I inadvertently removed an argument.

find . -name "*.pyc" -delete

I hope you can recover this, sorry for wasting your time.

No issues at all buddy, I should have checked the command before pasting it.

All stuff recovered thanks to git, so no issues at all. :slight_smile:

I’m glad you didn’t lose anything. I’ll double check potentially destructive commands such as these.

Did the correct command fix your issue?

1 Like