Hi All,
I have successfully installed Nutmeg Version with Tutor. I wanted to setup License and agreement content but when i click on the button i am getting this error please help me to solve the error because i have not found any solution in this discussion forum.
Please let me know if i have done any mistake during installing or configuration.
can you please share the logs of the error
Hi Smit,
I am getting error in whole admin i have installed fresh Edx on my server have not made any changes.I have used this command to generate my error logs.
tutor local logs --follow lms --tail=100 -f
Attaching to tutor_local_lms_1
lms_1 | return self.cursor.execute(sql, params)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/mysql/base.py”, line 78, in execute
lms_1 | raise IntegrityError(*tuple(e.args))
lms_1 | django.db.utils.IntegrityError: (1048, “Column ‘u ser_id’ cannot be null”)
lms_1 | 2022-07-01 11:50:01,578 ERROR 7 [django.request] [user 8] [ip 223.225.175.131] log.py:224 - Internal Server Error: /admin/agreeme nts/integritysignature/add/
lms_1 | Traceback (most recent call last):
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/mysql/base.py”, line 73, in execute
lms_1 | return self.cursor.execute(query, args)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /MySQLdb/cursors.py”, line 206, in execute
lms_1 | res = self._query(query)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /MySQLdb/cursors.py”, line 319, in _query
lms_1 | db.query(q)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /MySQLdb/connections.py”, line 254, in query
lms_1 | _mysql.connection.query(self, query)
lms_1 | MySQLdb._exceptions.OperationalError: (1048, “Col umn ‘user_id’ cannot be null”)
lms_1 |
lms_1 | During handling of the above exception, another e xception occurred:
lms_1 |
lms_1 | Traceback (most recent call last):
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/core/handlers/exception.py”, line 47, in inner
lms_1 | response = get_response(request)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/core/handlers/base.py”, line 181, in _get_response
lms_1 | response = wrapped_callback(request, *callbac k_args, **callback_kwargs)
lms_1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/ contextlib.py”, line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/options.py”, line 616, in wrapper
lms_1 | return self.admin_site.admin_view(view)(*args , **kwargs)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/utils/decorators.py”, line 130, in _wrapped_view
lms_1 | response = view_func(request, *args, **kwargs )
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/views/decorators/cache.py”, line 44, in _wrapped_view_func
lms_1 | response = view_func(request, *args, **kwargs )
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/sites.py”, line 232, in inner
lms_1 | return view(request, *args, **kwargs)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/options.py”, line 1657, in add_view
lms_1 | return self.changeform_view(request, None, fo rm_url, extra_context)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/utils/decorators.py”, line 43, in _wrapper
lms_1 | return bound_method(*args, **kwargs)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/utils/decorators.py”, line 130, in _wrapped_view
lms_1 | response = view_func(request, *args, **kwargs )
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/options.py”, line 1540, in changeform_view
lms_1 | return self.changeform_view(request, object id, form_url, extra_context)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/options.py”, line 1586, in _changeform_view
lms_1 | self.save_model(request, new_object, form, no t add)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/contrib/admin/options.py”, line 1099, in save_model
lms_1 | obj.save()
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /model_utils/models.py”, line 38, in save
lms_1 | super().save(*args, **kwargs)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/base.py”, line 739, in save
lms_1 | self.save_base(using=using, force_insert=forc e_insert,
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/base.py”, line 776, in save_base
lms_1 | updated = self._save_table(
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/base.py”, line 881, in _save_table
lms_1 | results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/base.py”, line 919, in _do_insert
lms_1 | return manager._insert(
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/manager.py”, line 85, in manager_method
lms_1 | return getattr(self.get_queryset(), name)(*ar gs, **kwargs)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/query.py”, line 1270, in _insert
lms_1 | return query.get_compiler(using=using).execut e_sql(returning_fields)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/models/sql/compiler.py”, line 1416, in execute_sql
lms_1 | cursor.execute(sql, params)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/utils.py”, line 66, in execute
lms_1 | return self._execute_with_wrappers(sql, param s, many=False, executor=self._execute)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/utils.py”, line 75, in _execute_with_wrappers
lms_1 | return executor(sql, params, many, context)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/utils.py”, line 84, in _execute
lms_1 | return self.cursor.execute(sql, params)
lms_1 | File “/openedx/venv/lib/python3.8/site-packages /django/db/backends/mysql/base.py”, line 78, in execute
lms_1 | raise IntegrityError(*tuple(e.args))
lms_1 | django.db.utils.IntegrityError: (1048, “Column ‘u ser_id’ cannot be null”)
lms_1 | 2022-07-01 12:01:11,252 INFO 7 [tracking] [user 8 ] [ip 223.225.175.131] logger.py:41 - {“name”: “/admin/agreements/integritysigna ture/add/”, “context”: {“user_id”: 8, “path”: “/admin/agreements/integritysignat ure/add/”, “course_id”: “”, “org_id”: “”, “enterprise_uuid”: “”}, “username”: “m anoj@abcddomainurl”, “session”: “1ed8a3908c4f9b3cb3ff2d1bf21241c7”, “ip”: “223.225.175 .131”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100 101 Firefox/102.0”, “host”: “domain”, “referer”: “domain/admin/”, “accept_language”: “en-US,en;q=0.5”, “event”: “{"GET": {}, "POS T": {}}”, “time”: “2022-07-01T12:01:11.251794+00:00”, “event_type”: “/admin/agr eements/integritysignature/add/”, “event_source”: “server”, “page”: null}
lms_1 | 2022-07-01 12:01:11,264 INFO 7 [openedx.core.djan goapps.cors_csrf.helpers] [user 8] [ip 223.225.175.131] helpers.py:64 - Origin ’ domaindomainurl’ was not in CORS_ORIGIN_WHITELIST
; full referer was ’ domaindomainurl/admin/’ and requested host was ‘aabbcccdomainurl’; CORS _ORIGIN_ALLOW_ALL=False
lms_1 | [pid: 7|app: 0|req: 19/212] 172.18.0.8 () {54 var s in 2056 bytes} [Fri Jul 1 12:01:11 2022] GET /admin/agreements/integritysigna ture/add/ => generated 127377 bytes in 754 msecs (HTTP/1.1 200) 9 headers in 589 bytes (1 switches on core 0)
lms_1 | 2022-07-01 12:01:16,469 INFO 23 [tracking] [user 8] [ip 223.225.175.131] logger.py:41 - {“name”: “/admin/api_admin/”, “context”: {“user_id”: 8, “path”: “/admin/api_admin/”, “course_id”: “”, “org_id”: “”, “ente rprise_uuid”: “”}, “username”: “user”, “session”: “1ed8a3908c4f9b3cb3ff 2d1bf21241c7”, “ip”: “223.225.175.131”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”, “host”: “aabbcccdomainurl”, “referer”: “domainurl/admin/agreements/integritysignature/add/”, “accept_language”: “en-US,en;q=0.5”, “event”: “{"GET": {}, "POST": {}}”, “t ime”: “2022-07-01T12:01:16.469049+00:00”, “event_type”: “/admin/api_admin/”, “ev ent_source”: “server”, “page”: null}
lms_1 | 2022-07-01 12:01:16,477 INFO 23 [openedx.core.dja ngoapps.cors_csrf.helpers] [user 8] [ip 223.225.175.131] helpers.py:64 - Origin ‘domainurl’ was not in CORS_ORIGIN_WHITELIST
; full referer was ‘domainurl/admin/agreements/integritysignature/add/’ and requeste d host was ‘aabbcccdomainurl’; CORS_ORIGIN_ALLOW_ALL=False
lms_1 | [pid: 23|app: 0|req: 17/213] 172.18.0.8 () {54 va rs in 2042 bytes} [Fri Jul 1 12:01:16 2022] GET /admin/api_admin/ => generated 3158 bytes in 237 msecs (HTTP/1.1 200) 8 headers in 411 bytes (1 switches on cor e 0)
lms_1 | 2022-07-01 12:01:22,786 INFO 7 [tracking] [user 8 ] [ip 223.225.175.131] logger.py:41 - {“name”: “/admin/”, “context”: {“user_id”: 8, “path”: “/admin/”, “course_id”: “”, “org_id”: “”, “enterprise_uuid”: “”}, “u sername”: “user”, “session”: “1ed8a3908c4f9b3cb3ff2d1bf21241c7”, “ip”: “223.225.175.131”, “agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”, “host”: “aabbcccdomainurl”, “referer”: " domainurl/admin/api_admin/", “accept_language”: “en-US,en;q=0.5”, “event” : “{"GET": {}, "POST": {}}”, “time”: “2022-07-01T12:01:22.786130+00:00”, “ev ent_type”: “/admin/”, “event_source”: “server”, “page”: null}
lms_1 | 2022-07-01 12:01:22,794 INFO 7 [openedx.core.djan goapps.cors_csrf.helpers] [user 8] [ip 223.225.175.131] helpers.py:64 - Origin ’ domainurl’ was not in CORS_ORIGIN_WHITELIST
; full referer was ’ domainurl/admin/api_admin/’ and requested host was ‘aabbccc. com’; CORS_ORIGIN_ALLOW_ALL=False
lms_1 | [pid: 7|app: 0|req: 20/214] 172.18.0.8 () {54 var s in 1998 bytes} [Fri Jul 1 12:01:22 2022] GET /admin/ => generated 164792 byte s in 424 msecs (HTTP/1.1 200) 8 headers in 413 bytes (1 switches on core 0)
Hi @ParvinKumar
if you are using your own custom site then you need to add it to CORS_ORIGIN_WHITELIST
variable which you can find over here course-discovery/course_discovery/settings/devstack.py
hope it helps
Hi Smit,
I am using production env in docker i am using docker local quickstart so please help me to add this.
run the command
tutor local run discovery bash
after that run
cd course_discovery/settings/
in that you will see devstack.py
file
in that file i think you will have to add your custom site
but again i am not sure about production environment
lastly, are you using your custom edx-platform or not
no I am using default tutor based Nutmeg without any customization
Hi Smit,
i am trying to enable this extension but no file with private.py in the course.
For ur reference i am attaching screenshot
edx_catalog_extensions
is disabled by default. edX developers should add course_discovery.apps.edx_catalog_extensions
to INSTALLED_APPS
in a private.py
settings file.